File: CMakeLists.txt

package info (click to toggle)
kdb 3.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,276 kB
  • sloc: cpp: 38,360; yacc: 940; python: 779; sh: 711; ansic: 440; lex: 367; xml: 182; sql: 51; makefile: 10
file content (67 lines) | stat: -rw-r--r-- 1,891 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
find_package(ECM 1.8.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(SetKDbCMakePolicies NO_POLICY_SCOPE)

project(KDb VERSION 3.2.0) # Update this

include(KDbAddTests)
include(KDbAddExamples)
kdb_add_tests(OFF)
kdb_add_examples(OFF)

# ECM
include(ECMGeneratePriFile)
include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(ECMPoQmTools)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDECMakeSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)

# Own
include(KDbCreateSharedDataClasses)
include(KDbGenerateHeaders)
include(KDbMacros)
include(KDbAddQCH)

simple_option(BUILD_QCH "Build API documentation in QCH format" OFF)

# Dependencies
set(CMAKE_CXX_STANDARD 17)
set(REQUIRED_QT_VERSION 5.4.0)
set(REQUIRED_KF5_VERSION 5.16.0)

# Required components to build this framework
# TODO move Widgets-dependent part to a libKDbWidgets
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Widgets Xml)
find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED CoreAddons)
find_package(ICU REQUIRED i18n uc)
set_package_properties(ICU PROPERTIES
                       PURPOSE "Required by KDb for unicode-aware string comparisons")

get_git_revision_and_branch()
add_unfinished_features_option()
add_pc_file(${PROJECT_NAME})

add_subdirectory(src)
add_subdirectory(tools)

if(BUILD_TESTING)
  add_subdirectory(autotests)
  add_subdirectory(tests)
endif()

add_custom_target(cppclean
    COMMAND ${CMAKE_SOURCE_DIR}/tools/cppclean-kdb.sh ${CMAKE_BINARY_DIR}
    COMMENT "Running CPPCLEAN"
)

if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
    ecm_install_po_files_as_qm(po)
endif()

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

include(/usr/share/pkg-kde-tools/cmake/DebianABIManager.cmake)