Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
1 | cmake_minimum_required(VERSION 3.0 FATAL_ERROR) | 1 | cmake_minimum_required(VERSION 3.0 FATAL_ERROR) | ||
---|---|---|---|---|---|
2 | find_package(ECM 1.8.0 REQUIRED NOMODULE) | 2 | find_package(ECM 1.8.0 REQUIRED NOMODULE) | ||
3 | set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | 3 | set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) | ||
4 | include(SetKexiCMakePolicies NO_POLICY_SCOPE) | 4 | include(SetKexiCMakePolicies NO_POLICY_SCOPE) | ||
5 | include(SetKexiVersionInfo) | 5 | include(SetKexiVersionInfo) | ||
6 | 6 | | |||
7 | project(Kexi VERSION ${PROJECT_VERSION}) | 7 | project(Kexi VERSION ${PROJECT_VERSION}) | ||
8 | 8 | | |||
9 | include(KexiAddTests) | 9 | include(KexiAddTests) | ||
10 | include(KexiAddExamples) | | |||
11 | kexi_add_tests(OFF) | 10 | kexi_add_tests(OFF) | ||
12 | kexi_add_examples(OFF) | | |||
13 | 11 | | |||
14 | # ECM | 12 | # ECM | ||
15 | include(ECMAddAppIcon) | 13 | include(ECMAddAppIcon) | ||
16 | include(ECMAddTests) | 14 | include(ECMAddTests) | ||
17 | include(ECMGenerateHeaders) | 15 | include(ECMGenerateHeaders) | ||
18 | include(ECMInstallIcons) | 16 | include(ECMInstallIcons) | ||
19 | include(ECMMarkAsTest) | 17 | include(ECMMarkAsTest) | ||
20 | include(ECMMarkNonGuiExecutable) | 18 | include(ECMMarkNonGuiExecutable) | ||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | 113 | add_definitions( | |||
117 | -DQT_NO_SIGNALS_SLOTS_KEYWORDS | 115 | -DQT_NO_SIGNALS_SLOTS_KEYWORDS | ||
118 | -DQT_NO_URL_CAST_FROM_STRING | 116 | -DQT_NO_URL_CAST_FROM_STRING | ||
119 | -DQT_STRICT_ITERATORS | 117 | -DQT_STRICT_ITERATORS | ||
120 | -DQT_USE_FAST_CONCATENATION | 118 | -DQT_USE_FAST_CONCATENATION | ||
121 | -DQT_USE_FAST_OPERATOR_PLUS | 119 | -DQT_USE_FAST_OPERATOR_PLUS | ||
122 | -DQT_USE_QSTRINGBUILDER | 120 | -DQT_USE_QSTRINGBUILDER | ||
123 | ) | 121 | ) | ||
124 | 122 | | |||
125 | # only with COMPILING_TESTS definition will all the FOO_TEST_EXPORT macros do something | | |||
126 | # TODO: check if this can be moved to only those places which make use of it, | | |||
127 | # to reduce global compiler definitions that would trigger a recompile of | | |||
128 | # everything on a change (like adding/removing tests to/from the build) | | |||
129 | macro_bool_to_01(BUILD_TESTING COMPILING_TESTS) | | |||
130 | | ||||
131 | # overcome some platform incompatibilities | 123 | # overcome some platform incompatibilities | ||
132 | if(WIN32) | 124 | if(WIN32) | ||
133 | find_package(KDEWin REQUIRED) | 125 | find_package(KDEWin REQUIRED) | ||
134 | endif() | 126 | endif() | ||
135 | 127 | | |||
136 | # set custom Kexi plugin installdir | 128 | # set custom Kexi plugin installdir | ||
137 | set(KEXI_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/${KEXI_BASE_PATH}) | 129 | set(KEXI_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/${KEXI_BASE_PATH}) | ||
138 | 130 | | |||
131 | simple_option(BUILD_EXAMPLES "Build and install examples" ON) | ||||
132 | | ||||
133 | macro_bool_to_01(BUILD_EXAMPLES COMPILING_EXAMPLES) | ||||
134 | | ||||
135 | # set custom Kexi examples installdir | ||||
136 | set(KEXI_EXAMPLES_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/examples/${KEXI_BASE_PATH}) | ||||
137 | | ||||
139 | # TEMPORARY: for initial Qt5/KF5 build porting phase deprecation warnings are only annoying noise | 138 | # TEMPORARY: for initial Qt5/KF5 build porting phase deprecation warnings are only annoying noise | ||
140 | # remove once code porting phase starts, perhaps first locally in product subdirs | 139 | # remove once code porting phase starts, perhaps first locally in product subdirs | ||
141 | #if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC) | 140 | #if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC) | ||
142 | # add_definitions(-Wno-deprecated -Wno-deprecated-declarations) | 141 | # add_definitions(-Wno-deprecated -Wno-deprecated-declarations) | ||
143 | #endif () | 142 | #endif () | ||
144 | 143 | | |||
145 | ########################### | 144 | ########################### | ||
146 | ############################ | 145 | ############################ | ||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |