Set CMake defaults if not supplied on commandline; set prefix to /usr for Qt only Linux builds, path to kde4-config --prefix for KDE4 builds, and set build type to Release

This commit is contained in:
craig.p.drummond
2014-01-17 20:06:39 +00:00
committed by craig.p.drummond
parent d186de5390
commit 14ecf733bd
3 changed files with 28 additions and 3 deletions

View File

@@ -66,6 +66,28 @@ if (NOT WIN32 AND NOT APPLE AND ENABLE_DEVICES_SUPPORT AND ENABLE_UDISKS2)
set(WITH_SOLID_UDISKS2 ON)
endif (NOT WIN32 AND NOT APPLE AND ENABLE_DEVICES_SUPPORT AND ENABLE_UDISKS2)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
message("-- Set build type to ${CMAKE_BUILD_TYPE}")
endif (NOT CMAKE_BUILD_TYPE)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (ENABLE_KDE)
find_program(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
PATHS ${CMAKE_INSTALL_PREFIX}/bin ${_KDEDIRS} /opt/kde4/bin NO_DEFAULT_PATH)
if (NOT KDE4_KDECONFIG_EXECUTABLE)
find_program(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config )
endif (NOT KDE4_KDECONFIG_EXECUTABLE)
if (KDE4_KDECONFIG_EXECUTABLE)
exec_program(${KDE4_KDECONFIG_EXECUTABLE} ARGS --prefix OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX)
message("-- Set install prefix to ${CMAKE_INSTALL_PREFIX}")
endif (KDE4_KDECONFIG_EXECUTABLE)
elseif (NOT APPLE AND NOT WIN32)
set(CMAKE_INSTALL_PREFIX "/usr")
message("-- Set install prefix to ${CMAKE_INSTALL_PREFIX}")
endif (ENABLE_KDE)
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if (ENABLE_TAGLIB)
set(TAGLIB_MIN_VERSION "1.6")
find_package(Taglib)

View File

@@ -60,6 +60,9 @@
but only images, and not icons, will be shown.
35. Europe and Canada regions in ListenLive are not re-loadable (as they are
read from listenlive.xml)
36. Set CMake defaults if not supplied on commandline; set prefix to /usr for
Qt only Linux builds, path to `kde4-config --prefix` for KDE4 builds, and
set build type to Release
1.2.2
-----

View File

@@ -6,7 +6,7 @@ KDE4
1. mkdir build
2. cd build
3. cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release
3. cmake ..
4. make
5. sudo make install
@@ -16,7 +16,7 @@ Qt4
1. mkdir build
2. cd build
3. cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_KDE=OFF
3. cmake .. -DENABLE_KDE=OFF
4. make
5. sudo make install
@@ -26,7 +26,7 @@ Qt5
1. mkdir build
2. cd build
3. cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DENABLE_KDE=OFF -DENABLE_QT5=ON
3. cmake .. -DENABLE_KDE=OFF -DENABLE_QT5=ON
4. make
5. sudo make install