Minor buildsystem improvements

- use find_package(KF5) to find the tier1 libs
- sort the add_definitions()/remove_definitions() calls a bit

Alex
This commit is contained in:
Alex Neundorf 2013-02-08 00:50:29 +01:00
parent 602f87ac96
commit 2fef398999

View File

@ -64,20 +64,12 @@ configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCu
set (QT_MIN_VERSION "5.0.0") set (QT_MIN_VERSION "5.0.0")
find_package(KF5 MODULE REQUIRED CMake Compiler InstallDirs)
#find_package(KF5Transitional REQUIRED)
find_package(kdeqt5staging REQUIRED NO_MODULE) find_package(kdeqt5staging REQUIRED NO_MODULE)
# the following are already somewhat "done" tier1 libs from kdelibs: # Load CMake, Compiler and InstallDirs settings from KF5 and the following are already somewhat "done" tier1 libs from kdelibs:
find_package(kidletime REQUIRED NO_MODULE) find_package(KF5 MODULE REQUIRED CMake Compiler InstallDirs
find_package(itemmodels REQUIRED NO_MODULE) kidletime itemmodels kwidgetsaddons kwindowsystem kcodecs karchive kcoreaddons solid)
find_package(kwidgetsaddons REQUIRED NO_MODULE) #find_package(KF5Transitional REQUIRED)
find_package(kwindowsystem REQUIRED NO_MODULE)
find_package(kcodecs REQUIRED NO_MODULE)
find_package(karchive REQUIRED NO_MODULE)
find_package(kcoreaddons REQUIRED NO_MODULE)
find_package(solid REQUIRED NO_MODULE)
# those are not "done" yet: # those are not "done" yet:
find_package(ki18n REQUIRED NO_MODULE) find_package(ki18n REQUIRED NO_MODULE)
@ -87,10 +79,6 @@ find_package(KDELibs4 NO_MODULE)
find_package(kdeclarative REQUIRED NO_MODULE) find_package(kdeclarative REQUIRED NO_MODULE)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_KEYWORDS)
if (APPLE) if (APPLE)
find_package(Carbon REQUIRED) find_package(Carbon REQUIRED)
endif (APPLE) endif (APPLE)
@ -158,13 +146,18 @@ set_package_properties(DBusMenuQt PROPERTIES DESCRIPTION "Support for notificati
######################################################################### #########################################################################
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
remove_definitions(-DQT3_SUPPORT_WARNINGS -DQT3_SUPPORT)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
remove_definitions(-DQT3_SUPPORT_WARNINGS -DQT3_SUPPORT)
remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_STRICT_ITERATORS -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_KEYWORDS)
################# setup the include directories ################# ################# setup the include directories #################
include_directories( ${kdeqt5staging_INCLUDE_DIRS} ${kdeqt5staging_INCLUDE_DIR} ${KDE4_INCLUDES}) include_directories( ${kdeqt5staging_INCLUDE_DIRS} ${kdeqt5staging_INCLUDE_DIR} ${KDE4_INCLUDES}
${KF5_INCLUDE_DIRS} # since e-c-m 0.0.7
)
# for including config.h and for includes like <kparts/foo.h> # for including config.h and for includes like <kparts/foo.h>
include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces ${CMAKE_SOURCE_DIR}/plasma/includes) include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/interfaces ${CMAKE_SOURCE_DIR}/plasma/includes)