Project:
Skrooge
Code Location:
git://anongit.kde.org/skroogemaster
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
179
180
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
179
180
#*************************************************************************** #* Copyright (C) 2008 by S. MANKOWSKI / G. DE BURE support@mankowski.fr * #* * #* This program is free software; you can redistribute it and/or modify * #* it under the terms of the GNU General Public License as published by * #* the Free Software Foundation; either version 2 of the License, or * #* (at your option) any later version. * #* * #* This program is distributed in the hope that it will be useful, * #* but WITHOUT ANY WARRANTY; without even the implied warranty of * #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * #* GNU General Public License for more details. * #* * #* You should have received a copy of the GNU General Public License * #* along with this program. If not, see <http://www.gnu.org/licenses/> * #*************************************************************************** MESSAGE( STATUS "..:: CMAKE ROOT ::..") PROJECT(skrooge) cmake_minimum_required(VERSION 2.8) IF(POLICY CMP0017) CMAKE_POLICY(SET CMP0017 OLD) # or even better, NEW ENDIF(POLICY CMP0017) IF(POLICY CMP0002) CMAKE_POLICY(SET CMP0002 OLD) # to authorize the build with po files ENDIF(POLICY CMP0002) FIND_PACKAGE(KDE4 REQUIRED) INCLUDE(KDE4Defaults) INCLUDE(MacroLibrary) MESSAGE(STATUS " KDE4 support enabled : ${KDE4_DATA_DIR}") add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) FIND_PACKAGE(Grantlee) if( NOT Grantlee_FOUND ) message(FATAL_ERROR "Package Grantlee required, but not found!") else( NOT Grantlee_FOUND ) message(STATUS "Package Grantlee found!") endif( NOT Grantlee_FOUND ) SET(GRANTLEE_VERSION ${Grantlee_VERSION_MAJOR}.${Grantlee_VERSION_MINOR}.${Grantlee_VERSION_PATCH}) MESSAGE( STATUS " GRANTLEE VERSION : " ${GRANTLEE_VERSION}) if(${GRANTLEE_VERSION} VERSION_LESS "0.1.7") MESSAGE( STATUS " enable GRANTLEE 0.1.4 API") else(${GRANTLEE_VERSION} VERSION_LESS "0.1.7") MESSAGE( STATUS " enable GRANTLEE 0.1.7 API") add_definitions(-DSKGGRANTLEE17ENABLED=Y) endif(${GRANTLEE_VERSION} VERSION_LESS "0.1.7") SET(SKG_VERSION "1.8.0") SET(SKG_BETA "BETA") SET(SOVERSION 1) SET( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${skrooge_SOURCE_DIR}/cmake/modules ) IF (CMAKE_BUILD_TYPE) ELSE (CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE profile) #"release": optimized for speed, no debug symbols or debug messages #"relwithdebinfo": optimized for speed, debug symbols for backtraces #"debug": optimized, but debuggable #"debugfull": no optimizations, full debug support #"profile": adds coverage flags to debugfull #"none": the build flags are manually set using the CMAKE_CXX_FLAGS option. ENDIF (CMAKE_BUILD_TYPE) FIND_PROGRAM(SKG_BASH bash) MARK_AS_ADVANCED(SKG_BASH) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) OPTION(SKG_BUILD_TEST "Build the test" ON) MESSAGE( STATUS " PROJECT_SOURCE_DIR : " ${PROJECT_SOURCE_DIR} ) MESSAGE( STATUS " PROJECT_BINARY_DIR : " ${PROJECT_BINARY_DIR} ) MESSAGE( STATUS " BUILD_DIR : " ${BUILD_DIR} ) MESSAGE( STATUS " CMAKE_BUILD_TYPE : " ${CMAKE_BUILD_TYPE} ) MESSAGE( STATUS " CMAKE_INSTALL_PREFIX: " ${CMAKE_INSTALL_PREFIX} ) MESSAGE( STATUS " SKG_BUILD_TEST : " ${SKG_BUILD_TEST} ) IF(CMAKE_BUILD_TYPE MATCHES "profile") MESSAGE( STATUS " TRACES : All traces activated") #add_definitions(-DSKGFULLTRACES) ELSE(CMAKE_BUILD_TYPE MATCHES "profile") IF(CMAKE_BUILD_TYPE MATCHES "debug" OR SKG_BETA MATCHES "BETA") MESSAGE( STATUS " TRACES : Some traces activated") ELSE(CMAKE_BUILD_TYPE MATCHES "debug" OR SKG_BETA MATCHES "BETA") MESSAGE( STATUS " TRACES : All traces disabled") add_definitions(-DSKGNOTRACES) ENDIF(CMAKE_BUILD_TYPE MATCHES "debug" OR SKG_BETA MATCHES "BETA") ENDIF(CMAKE_BUILD_TYPE MATCHES "profile") add_definitions(-DSKGVERSION=${SKG_VERSION}${SKG_BETA}) include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/skgbasemodeler/ ${CMAKE_CURRENT_SOURCE_DIR}/skgbasegui/ ${CMAKE_CURRENT_BINARY_DIR}/skgbasegui/ ${CMAKE_CURRENT_SOURCE_DIR}/skgbasemodelertest ${CMAKE_CURRENT_SOURCE_DIR}/skgbankmodeler/ ${CMAKE_CURRENT_SOURCE_DIR}/skgbankgui ${CMAKE_CURRENT_BINARY_DIR}/skgbankgui) #Correction bug 207249 vvvv #SET(CMAKE_CXX_FLAGS "-Wall" ) IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}") ENDIF(CMAKE_COMPILER_IS_GNUCXX) #Correction bug 207249 ^^^^ #Default installation path set(CMAKE_INSTALL_PREFIX ${BUILD_DIR}) # Win32 specific configuration IF(WIN32) ADD_DEFINITIONS(-DSKG_PLATFORM_WIN32) IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-runtime-pseudo-reloc -Wl,--export-all-symbols" CACHE STRING "" FORCE) ENDIF(CMAKE_COMPILER_IS_GNUCXX) IF (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) ADD_DEFINITIONS( -DQT_DEBUG ) ENDIF (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) ELSE(WIN32) #To solve Bug 209912:"ldd -u <library>"" #does not work on MACOS, must be done manually SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed" CACHE STRING "" FORCE) ENDIF(WIN32) MESSAGE(STATUS " CMAKE_SHARED_LINKER_FLAGS : ${CMAKE_SHARED_LINKER_FLAGS}") ADD_SUBDIRECTORY(skg_dataengine) #<-- Experimental #ADD_SUBDIRECTORY ADD_SUBDIRECTORY(skgbasemodeler) ADD_SUBDIRECTORY(skgbankmodeler) ADD_SUBDIRECTORY(skgbasegui) ADD_SUBDIRECTORY(skgbankgui) ADD_SUBDIRECTORY(plugins) ADD_SUBDIRECTORY(images) IF(SKG_BUILD_TEST AND NOT WIN32) ADD_SUBDIRECTORY(tests) ENDIF(SKG_BUILD_TEST AND NOT WIN32) #Main application ADD_SUBDIRECTORY(skrooge) ADD_SUBDIRECTORY(skroogeconvert) ADD_SUBDIRECTORY(skroogeakonadi) CONFIGURE_FILE(scripts/addNewPlugin.sh.in scripts/addNewPlugin.sh @ONLY) CONFIGURE_FILE(scripts/addNewImportPlugin.sh.in scripts/addNewImportPlugin.sh @ONLY) #DOXYGEN ADD_CUSTOM_TARGET(apidox "doxygen" "${PROJECT_SOURCE_DIR}/Doxyfile") #ASTYLE CONFIGURE_FILE(scripts/astyle.sh.in scripts/astyle.sh @ONLY) ADD_CUSTOM_TARGET(astyle "scripts/astyle.sh") #KRAZY CONFIGURE_FILE(scripts/krazy.sh.in scripts/krazy.sh @ONLY) ADD_CUSTOM_TARGET(krazy "scripts/krazy.sh") #GENERATE ICONS CONFIGURE_FILE(scripts/generateIcons.sh.in scripts/generateIcons.sh @ONLY) #GENERATE SPLASH SCREEN CONFIGURE_FILE(scripts/generateSplash.sh.in scripts/generateSplash.sh @ONLY) ADD_CUSTOM_TARGET(splash "scripts/generateSplash.sh") #LCOV CONFIGURE_FILE(scripts/removeTmpFile.sh.in scripts/removeTmpFile.sh @ONLY) CONFIGURE_FILE(scripts/lcov.sh.in scripts/lcov.sh @ONLY) ADD_CUSTOM_TARGET(lcov "scripts/lcov.sh") ADD_CUSTOM_TARGET(lcovclean "scripts/lcov.sh" "-b") CONFIGURE_FILE(CTestCustom.cmake CTestCustom.cmake @ONLY) #FULL ADD_CUSTOM_TARGET(full "scripts/full.sh")
