Fix correct signal/slot
[kdepim.git] / kdgantt2 / CMakeLists.txt
blob148892e7738625203ab0a953dcc50e64058050c9
2 cmake_minimum_required(VERSION 2.8.12)
4 project(kdgantt2)
6 if(${CMAKE_SOURCE_DIR} STREQUAL ${kdgantt2_SOURCE_DIR})
7 # ECM setup
8 find_package(ECM 5.16.0 CONFIG REQUIRED)
9 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
10 set(LIBRARY_NAMELINK)
11 include(GenerateExportHeader)
12 include(ECMSetupVersion)
13 include(ECMGenerateHeaders)
14 include(ECMGeneratePriFile)
15 include(ECMPackageConfigHelpers)
16 include(ECMSetupVersion)
17 include(FeatureSummary)
18 include(KDEInstallDirs)
19 include(KDECMakeSettings)
20 include(KDEFrameworkCompilerSettings)
21 include(ECMQtDeclareLoggingCategory)
22 include(ECMAddTests)
25 set(KF5_VERSION "5.16.0")
26 set(KDEPIM_LIB_VERSION "5.1")
27 set(QT_REQUIRED_VERSION "5.4.0")
28 set(KMIME_LIB_VERSION "4.87.0")
30 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test PrintSupport)
31 find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
33 ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX KDGANTT2
34                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_version.h"
35                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2ConfigVersion.cmake"
36                         SOVERSION 5
39 ########### Targets ###########
41 add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
42 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
43 ########### CMake Config Files ###########
44 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5KDGantt2")
46 ecm_configure_package_config_file(
47   "${CMAKE_CURRENT_SOURCE_DIR}/KF5KDGantt2Config.cmake.in"
48   "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2Config.cmake"
49   INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
52 install(FILES
53   "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2Config.cmake"
54   "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2ConfigVersion.cmake"
55   DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
56   COMPONENT Devel
59 install(EXPORT KF5KDGantt2Targets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5KDGantt2Targets.cmake NAMESPACE KF5::)
61 install(FILES
62    ${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_version.h
63   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
66 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
67 else()
68 ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX KDGANTT2
69                         VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdgantt2_version.h"
70                         PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KDGantt2ConfigVersion.cmake"
71                         SOVERSION 5
73 endif()
75 # Laurent install it if you want to debug it
76 #add_subdirectory(tests)
77 add_subdirectory(src)