3 if(${CMAKE_SOURCE_DIR} STREQUAL ${ktnef_SOURCE_DIR})
4 cmake_minimum_required(VERSION 3.1)
5 set(KF5_VERSION "5.22.0")
6 find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
7 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
8 include(ECMInstallIcons)
10 include(ECMOptionalAddSubdirectory)
11 include(ECMSetupVersion)
13 include(ECMMarkNonGuiExecutable)
14 include(GenerateExportHeader)
15 include(ECMGenerateHeaders)
16 include(CMakePackageConfigHelpers)
17 include(FeatureSummary)
18 include(CheckFunctionExists)
19 include(ECMGeneratePriFile)
21 include(KDEInstallDirs)
22 include(KDECMakeSettings)
23 include(KDECompilerSettings NO_POLICY_SCOPE)
24 include(ECMAddAppIcon)
25 include(ECMQtDeclareLoggingCategory)
27 set(QT_REQUIRED_VERSION "5.6.0")
28 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui Widgets)
30 set(KTNEF_LIB_VERSION "5.2.40")
31 find_package(KF5Tnef ${KTNEF_LIB_VERSION} CONFIG REQUIRED)
32 find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
33 find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
34 include_directories(${ktnef_SOURCE_DIR} ${ktnef_BINARY_DIR} ${ktnef_BINARY_DIR}/src)
38 add_definitions(-DQT_USE_QSTRINGBUILDER)
39 include(TestBigEndian)
40 test_big_endian(CMAKE_WORDS_BIGENDIAN)
41 configure_file(src/config-ktnef.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-ktnef.h)
42 add_definitions( -DQT_NO_CAST_FROM_ASCII )
43 add_definitions( -DQT_NO_CAST_TO_ASCII )
47 install( FILES ktnef.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
49 if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
50 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)