CMakeLists.txt 1.14 KB
Newer Older
1
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
Albert Astals Cid's avatar
Albert Astals Cid committed
2

3
project(libkmahjongg VERSION "5.1.0")
4

5
set(QT_MIN_VERSION "5.12.0")
6
set(KF_MIN_VERSION "5.68.0")
Raymond Wooninck's avatar
Raymond Wooninck committed
7

8
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
Raymond Wooninck's avatar
Raymond Wooninck committed
9

10
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH})
Raymond Wooninck's avatar
Raymond Wooninck committed
11

12
13
14
15
16
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Gui
    Svg
)
17
find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
Frederik Schwarzer's avatar
Frederik Schwarzer committed
18
19
20
21
22
23
24
    CoreAddons
    Config
    ConfigWidgets
    WidgetsAddons
    Completion
    I18n
)
Raymond Wooninck's avatar
Raymond Wooninck committed
25

26
27
28
29
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)

Raymond Wooninck's avatar
Raymond Wooninck committed
30
31
include(FeatureSummary)
include(GenerateExportHeader)
32
include(CMakePackageConfigHelpers)
Raymond Wooninck's avatar
Raymond Wooninck committed
33
include(ECMSetupVersion)
34
include(ECMGenerateHeaders)
Laurent Montel's avatar
Laurent Montel committed
35
include(ECMQtDeclareLoggingCategory)
Raymond Wooninck's avatar
Raymond Wooninck committed
36

37
38
add_definitions(
    -DQT_NO_KEYWORDS
39
    -DQT_NO_FOREACH
40
41
42
43
    -DQT_STRICT_ITERATORS
    -DQT_DISABLE_DEPRECATED_BEFORE=0x050900
    -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x052E00
)
Raymond Wooninck's avatar
Raymond Wooninck committed
44

45
add_subdirectory(src)
Frederik Schwarzer's avatar
Frederik Schwarzer committed
46
47
add_subdirectory(tilesets)
add_subdirectory(backgrounds)
48

49
50
ki18n_install(po)

51
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)