Make it possible to compile out the default CMAKE_INSTALL_PREFIX paths for projectm visualisations

This commit is contained in:
David Sansome 2010-06-22 15:46:51 +00:00
parent 300772ad89
commit faf34a92bb
3 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -26,6 +26,7 @@
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#cmakedefine ENABLE_VISUALISATIONS
#cmakedefine VISUALISATIONS_USE_INSTALL_PREFIX
#cmakedefine SNOW_LEOPARD
#cmakedefine LEOPARD

View File

@ -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";