From faf34a92bb31c3c65be91cc4542052c1b142ced0 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Tue, 22 Jun 2010 15:46:51 +0000 Subject: [PATCH] Make it possible to compile out the default CMAKE_INSTALL_PREFIX paths for projectm visualisations --- src/CMakeLists.txt | 2 ++ src/config.h.in | 1 + src/visualisations/projectmvisualisation.cpp | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f9610aa3d..2487873d1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -336,6 +336,8 @@ print_engines() # Visualisations if(ENABLE_VISUALISATIONS) + option(VISUALISATIONS_USE_INSTALL_PREFIX "Look for visualisations in CMAKE_INSTALL_PREFIX" ON) + list(APPEND SOURCES visualisations/projectmpresetmodel.cpp visualisations/projectmvisualisation.cpp diff --git a/src/config.h.in b/src/config.h.in index 98d473359..09c743dbb 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -26,6 +26,7 @@ #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" #cmakedefine ENABLE_VISUALISATIONS +#cmakedefine VISUALISATIONS_USE_INSTALL_PREFIX #cmakedefine SNOW_LEOPARD #cmakedefine LEOPARD diff --git a/src/visualisations/projectmvisualisation.cpp b/src/visualisations/projectmvisualisation.cpp index c4d5d41f4..699d0b767 100644 --- a/src/visualisations/projectmvisualisation.cpp +++ b/src/visualisations/projectmvisualisation.cpp @@ -58,10 +58,12 @@ ProjectMVisualisation::~ProjectMVisualisation() { void ProjectMVisualisation::InitProjectM() { // Find the projectM presets QStringList paths = QStringList() +#ifdef VISUALISATIONS_USE_INSTALL_PREFIX << CMAKE_INSTALL_PREFIX "/share/clementine/projectm-presets" + << CMAKE_INSTALL_PREFIX "/share/projectM/presets" +#endif << "/usr/share/clementine/projectm-presets" << "/usr/local/share/clementine/projectm-presets" - << CMAKE_INSTALL_PREFIX "/share/projectM/presets" << "/usr/share/projectM/presets" << "/usr/local/share/projectM/presets";