forked from KDE/okteta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
178 lines (155 loc) · 4.65 KB
/
CMakeLists.txt
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
cmake_minimum_required(VERSION 3.1)
project(Okteta VERSION 0.26.60)
set(REQUIRED_KF5_VERSION "5.57.0")
find_package(ECM ${REQUIRED_KF5_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
# ECM KDE macros (include first, to have their policies and settings effect all other macros)
include(KDEInstallDirs)
include(KDECMakeSettings NO_POLICY_SCOPE)
include(KDECompilerSettings NO_POLICY_SCOPE)
# ECM macros
include(ECMInstallIcons)
include(ECMAddAppIcon)
# CMake macros
include(FeatureSummary)
include(CMakeDependentOption)
if(BUILD_TESTING)
include(ECMAddTests)
endif()
# Okteta macros
include(OktetaInternalMacros)
# control build scope, default to examples if BUILD_TESTING is ON
if( NOT DEFINED OMIT_EXAMPLES AND NOT BUILD_TESTING )
set( OMIT_EXAMPLES TRUE )
endif()
if( NOT DEFINED OMIT_INTERNAL_TEMPLATES AND NOT BUILD_TESTING )
set( OMIT_INTERNAL_TEMPLATES TRUE )
endif()
if( NOT OMIT_EXAMPLES )
set( OKTETA_BUILD_EXAMPLES TRUE )
endif()
if( NOT OMIT_INTERNAL_TEMPLATES )
set( KASTEN_BUILD_INTERNAL_TEMPLATES TRUE )
endif()
option(BUILD_DESIGNERPLUGIN "Build the Designer plugin." ON)
add_feature_info(DESIGNERPLUGIN ${BUILD_DESIGNERPLUGIN} "Qt Designer plugin")
option(BUILD_OKTETAKASTENLIBS "Build the Okteta Kasten libraries." ON)
add_feature_info(OKTETAKASTENLIBS ${BUILD_OKTETAKASTENLIBS} "Okteta Kasten libraries")
cmake_dependent_option(BUILD_KPARTSPLUGIN "Build the KParts plugin." ON "BUILD_OKTETAKASTENLIBS" OFF)
add_feature_info(KPARTSPLUGIN ${BUILD_KPARTSPLUGIN} "KParts plugin")
cmake_dependent_option(BUILD_DESKTOPPROGRAM "Build the program." ON "BUILD_OKTETAKASTENLIBS" OFF)
add_feature_info(DESKTOPPROGRAM ${BUILD_DESKTOPPROGRAM} "Program")
set(REQUIRED_QT_VERSION "5.12.0")
set(ADDITIONAL_REQUIRED_QT_COMPONENTS)
if(BUILD_TESTING)
list(APPEND ADDITIONAL_REQUIRED_QT_COMPONENTS Test)
endif()
if( BUILD_DESIGNERPLUGIN )
list(APPEND ADDITIONAL_REQUIRED_QT_COMPONENTS UiPlugin)
endif()
if( BUILD_OKTETAKASTENLIBS )
list(APPEND ADDITIONAL_REQUIRED_QT_COMPONENTS
Network
PrintSupport
Qml
Script
ScriptTools
Xml
)
endif()
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED
COMPONENTS
Core
Widgets
${ADDITIONAL_REQUIRED_QT_COMPONENTS}
)
set(ADDITIONAL_REQUIRED_KF_COMPONENTS)
if( BUILD_OKTETAKASTENLIBS )
list(APPEND ADDITIONAL_REQUIRED_KF_COMPONENTS
Bookmarks
Completion
IconThemes
KCMUtils
KIO
NewStuff
Parts
Service
WidgetsAddons
XmlGui
)
endif()
if( BUILD_DESKTOPPROGRAM )
list(APPEND ADDITIONAL_REQUIRED_KF_COMPONENTS
Crash
DBusAddons
DocTools
)
endif()
find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED
COMPONENTS
Codecs
ConfigWidgets
I18n
${ADDITIONAL_REQUIRED_KF_COMPONENTS}
)
find_package(Qca-qt5 2.1.0)
set_package_properties(Qca-qt5 PROPERTIES
DESCRIPTION "Qt Cryptographic Architecture"
URL "https://commits.kde.org/qca"
TYPE OPTIONAL
PURPOSE "Needed for most of the algorithms of the checksum tool"
)
add_definitions(
-DQT_DEPRECATED_WARNINGS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050C00
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_KEYWORDS
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_NO_FOREACH
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x053900
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# helper libs
add_subdirectory( libs )
if( BUILD_DESKTOPPROGRAM )
add_subdirectory( doc )
endif()
set( OKTETALIBS_MAJOR_VERSION 0 )
set( OKTETALIBS_MINOR_VERSION 10 )
set( OKTETALIBS_PATCHLEVEL_VERSION 0 )
set( OKTETALIBS_VERSION "${OKTETALIBS_MAJOR_VERSION}.${OKTETALIBS_MINOR_VERSION}.${OKTETALIBS_PATCHLEVEL_VERSION}" )
set( OKTETALIBS_ABI_VERSION 3 )
set( OKTETALIBS_LIB_SOVERSION 0 )
set( OKTETALIBS_LIB_VERSION ${OKTETALIBS_VERSION} )
# Okteta libs
add_subdirectory( core )
add_subdirectory( gui )
if( BUILD_DESIGNERPLUGIN )
add_subdirectory( designer )
endif()
# Okteta Kasten components
if( BUILD_OKTETAKASTENLIBS )
add_subdirectory( kasten )
endif()
# special mimetypes
if( BUILD_OKTETAKASTENLIBS )
add_subdirectory( mimetypes )
endif()
# programs and parts for desktop
add_subdirectory( parts )
if( BUILD_DESKTOPPROGRAM )
add_subdirectory( program )
endif()
ki18n_install(po)
if( BUILD_DESKTOPPROGRAM )
kdoctools_install(po)
endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)