1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 10:48:33 +01:00

Add a cmake option to use a system install of libprojectM. No, gentoo users, you shouldn't use this.

This commit is contained in:
David Sansome 2010-07-10 20:21:06 +00:00
parent 91f801639a
commit acf9ff5fd3
6 changed files with 34 additions and 10 deletions

View File

@ -124,7 +124,16 @@ endif(NOT GETTEXT_XGETTEXT_EXECUTABLE)
option(ENABLE_VISUALISATIONS "Use libprojectm visualisations" ON)
option(BUNDLE_PROJECTM_PRESETS "Install Clementine's own copies of libprojectm presets - disable this if you want to use a system package instead" ON)
if(ENABLE_VISUALISATIONS)
# When/if upstream accepts our patches then these options can be used to link
# to system installed 3rdparty libraries instead.
option(USE_SYSTEM_PROJECTM "Don't set this option unless your system projectM library has been compiled with the Clementine patches in 3rdparty" OFF)
if(USE_SYSTEM_PROJECTM)
pkg_check_modules(LIBPROJECTM projectM)
else(USE_SYSTEM_PROJECTM)
add_subdirectory(3rdparty/libprojectm)
set(LIBPROJECTM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libprojectm)
set(LIBPROJECTM_LIBRARIES projectM)
endif(USE_SYSTEM_PROJECTM)
endif(ENABLE_VISUALISATIONS)
# Test whether libsqlite3 is available and if FTS3 is enabled in it

View File

@ -10,11 +10,11 @@ include_directories(../3rdparty/qtsingleapplication)
include_directories(../3rdparty/qtiocompressor)
include_directories(../3rdparty/qtwin)
include_directories(../3rdparty/qxt)
include_directories(../3rdparty/libprojectm)
include_directories(${GLIB_INCLUDE_DIRECTORIES})
include_directories(${LIBXML_INCLUDE_DIRECTORIES})
include_directories(${GOBJECT_INCLUDE_DIRECTORIES})
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${LIBXML_INCLUDE_DIRS})
include_directories(${GOBJECT_INCLUDE_DIRS})
include_directories(${LIBPROJECTM_INCLUDE_DIRS})
cmake_policy(SET CMP0011 NEW)
include(../cmake/AddEngine.cmake)
@ -530,7 +530,7 @@ target_link_libraries(clementine_lib
)
if(ENABLE_VISUALISATIONS)
target_link_libraries(clementine_lib projectM)
target_link_libraries(clementine_lib ${LIBPROJECTM_LIBRARIES})
endif(ENABLE_VISUALISATIONS)
if(HAVE_LIBGPOD)

View File

@ -27,6 +27,7 @@
#cmakedefine ENABLE_VISUALISATIONS
#cmakedefine VISUALISATIONS_USE_INSTALL_PREFIX
#cmakedefine USE_SYSTEM_PROJECTM
#cmakedefine SNOW_LEOPARD
#cmakedefine LEOPARD

View File

@ -14,10 +14,15 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "projectmpresetmodel.h"
#include "projectmvisualisation.h"
#include <projectM.hpp>
#ifdef USE_SYSTEM_PROJECTM
# include <libprojectM/projectM.hpp>
#else
# include "projectM.hpp"
#endif
#include <QtDebug>
#include <QDir>

View File

@ -31,7 +31,11 @@
#include <QtDebug>
#include <QTimerEvent>
#include <projectM.hpp>
#ifdef USE_SYSTEM_PROJECTM
# include <libprojectM/projectM.hpp>
#else
# include "projectM.hpp"
#endif
#ifdef Q_OS_MAC
# include "core/mac_startup.h"
@ -50,7 +54,7 @@ ProjectMVisualisation::ProjectMVisualisation(QObject *parent)
{
connect(this, SIGNAL(sceneRectChanged(QRectF)), SLOT(SceneRectChanged(QRectF)));
for (int i=0 ; i<TOTAL_RATING_TYPES ; ++i)
for (int i=0 ; i<4 ; ++i)
default_rating_list_.push_back(3);
}

View File

@ -14,6 +14,7 @@
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "projectmpresetmodel.h"
#include "projectmvisualisation.h"
#include "visualisationselector.h"
@ -21,7 +22,11 @@
#include <QPushButton>
#include <projectM.hpp>
#ifdef USE_SYSTEM_PROJECTM
# include <libprojectM/projectM.hpp>
#else
# include "projectM.hpp"
#endif
VisualisationSelector::VisualisationSelector(QWidget *parent)
: QDialog(parent),