X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=e28d90fb4c352874334504ee170a8d3a0782b4ff;hp=8b7e3dbe17ef459f837edc56555626665c6c8b69;hb=1514aaae673660c7a3e2a82545b8c3947ea3f9b7;hpb=392367381225027246e8c765a7c3b7e5bf186ee2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b7e3dbe..e28d90fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,11 +16,11 @@ project(QuasselIRC) -# Target scopes don't work in older versions -cmake_minimum_required(VERSION 2.4.7 FATAL_ERROR) +cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) + cmake_policy(SET CMP0005 NEW) endif(COMMAND cmake_policy) # Use our own (well, and KDE's) version of some modules @@ -61,6 +61,8 @@ set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/apps) set(ICON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/icons) set(XDG_APPS_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/applications) +add_definitions(-DPREFIX=${CMAKE_INSTALL_PREFIX}) + # Enable various flags on gcc if(CMAKE_COMPILER_IS_GNUCXX) # Let's just hope that all gccs support these options and skip the tests... @@ -86,23 +88,6 @@ if(EXECINFO_FOUND) link_libraries(${EXECINFO_LIBRARIES}) endif(EXECINFO_FOUND) -# Decide what to do with icons -if(WANT_QTCLIENT OR WANT_MONO) - if(QUASSEL_ICONS MATCHES "External") - message(STATUS "Install Quassel icons to ${CMAKE_INSTALL_PREFIX}/share/apps/quassel") - else(QUASSEL_ICONS MATCHES "External") - set(QUASSEL_ICONS "Builtin") - message(STATUS "Compile Quassel icons into the binary") - endif(QUASSEL_ICONS MATCHES "External") - - if(OXYGEN_ICONS MATCHES "External") - message(STATUS "Use system-installed Oxygen icon theme") - else(OXYGEN_ICONS MATCHES "External") - set(OXYGEN_ICONS "Builtin") - message(STATUS "Compile Oxygen icon theme subset into the binary") - endif(OXYGEN_ICONS MATCHES "External") -endif(WANT_QTCLIENT OR WANT_MONO) - # Select a Qt installation here, if you don't want to use system Qt if(QT) # FindQt4 will look for the qmake binary in $PATH, so we just prepend the Qt dir @@ -188,6 +173,22 @@ add_custom_target(genversion_run ALL ${GENVERSION_EXECUTABLE} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/src/common/version.gen) add_dependencies(genversion_run genversion) +# Decide what to do with icons +if(WANT_QTCLIENT OR WANT_MONO) + if(QUASSEL_ICONS MATCHES "External") + message(STATUS "Install Quassel icons to ${CMAKE_INSTALL_PREFIX}/share/apps/quassel") + else(QUASSEL_ICONS MATCHES "External") + set(QUASSEL_ICONS "Builtin") + message(STATUS "Compile Quassel icons into the binary") + endif(QUASSEL_ICONS MATCHES "External") + + if(OXYGEN_ICONS MATCHES "External") + message(STATUS "Use system-installed Oxygen icon theme") + else(OXYGEN_ICONS MATCHES "External") + set(OXYGEN_ICONS "Builtin") + message(STATUS "Compile Oxygen icon theme subset into the binary") + endif(OXYGEN_ICONS MATCHES "External") +endif(WANT_QTCLIENT OR WANT_MONO) # These variables will be added to the main targets (CORE, QTCLIENT, MONO)