Sun, 25 Jul 2021 13:49:37 +0300
work on editing tools
0 | 1 | project(ldforge) |
2 | cmake_minimum_required(VERSION 2.8.12) | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
3 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") |
99
05ce5a34c497
disable cotire because it's messing up Qt Creator's Clang code model for me
Teemu Piippo <teemu@hecknology.net>
parents:
98
diff
changeset
|
4 | #include(cotire) |
21 | 5 | set(OpenGL_GL_PREFERENCE GLVND) |
0 | 6 | find_package(Qt5Widgets REQUIRED) |
6 | 7 | if (Qt5Widgets_VERSION VERSION_LESS 5.5.0) |
8 | message(FATAL_ERROR "Qt5 version 5.5 required") | |
9 | endif() | |
0 | 10 | find_package(Qt5Core REQUIRED) |
11 | find_package(Qt5OpenGL REQUIRED) | |
12 | find_package(Qt5Network REQUIRED) | |
105
6ca6e8c647d4
added preview layer code and fixed build warnings
Teemu Piippo <teemu@hecknology.net>
parents:
104
diff
changeset
|
13 | #find_package(Qt5LinguistTools REQUIRED) |
28 | 14 | find_package(GLM REQUIRED) |
15 | set(CMAKE_AUTOMOC ON) | |
16 | set(CMAKE_AUTOUIC ON) | |
17 | set(CMAKE_AUTORCC ON) | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
18 | find_package(OpenGL REQUIRED) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
19 | include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) |
28 | 20 | include_directories(${GLM_INCLUDE_DIR}) |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
21 | source_group("1 Foundation code" REGULAR_EXPRESSION "src/.+\\.(cpp|h|ui)") |
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
22 | source_group("4 OpenGL renderer" REGULAR_EXPRESSION "src/gl/.+\\.(cpp|h|ui)") |
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
23 | source_group("5 LDraw line types" REGULAR_EXPRESSION "src/linetypes/.+\\.(cpp|h|ui)") |
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
24 | source_group("3.2 Widgets" REGULAR_EXPRESSION "src/(ui|widgets)/.+\\.(cpp|h|ui)") |
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
25 | source_group("3.1 Settings editor" REGULAR_EXPRESSION "src/settingseditor/.+\\.(cpp|h|ui)") |
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
26 | source_group("3 User interface" REGULAR_EXPRESSION "src/(mainwindow|document|documentmanager|uiutilities)\\.(cpp|h|ui)") |
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
27 | source_group("2 Model handling" REGULAR_EXPRESSION "src/(model|modeleditcontext|libraries|colors|parser)\\.(cpp|h|ui)") |
96 | 28 | source_group("6 Editing tools" REGULAR_EXPRESSION "src/tools/.+\\.(cpp|h|ui)") |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
29 | |
0 | 30 | set (LDFORGE_SOURCES |
26 | 31 | src/colors.cpp |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
7
diff
changeset
|
32 | src/document.cpp |
3 | 33 | src/documentmanager.cpp |
55 | 34 | src/geometry.cpp |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
35 | src/libraries.cpp |
17 | 36 | src/invert.cpp |
0 | 37 | src/main.cpp |
1 | 38 | src/mainwindow.cpp |
3 | 39 | src/model.cpp |
40 | src/modeleditcontext.cpp | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
41 | src/parser.cpp |
16 | 42 | src/uiutilities.cpp |
1 | 43 | src/version.cpp |
69
a36913fc552a
begin work on axes program
Teemu Piippo <teemu@hecknology.net>
parents:
63
diff
changeset
|
44 | src/gl/axesprogram.cpp |
70 | 45 | src/gl/basicshaderprogram.cpp |
17 | 46 | src/gl/compiler.cpp |
53 | 47 | src/gl/gridprogram.cpp |
17 | 48 | src/gl/partrenderer.cpp |
14 | 49 | src/linetypes/comment.cpp |
50 | src/linetypes/conditionaledge.cpp | |
51 | src/linetypes/edge.cpp | |
52 | src/linetypes/errorline.cpp | |
53 | src/linetypes/metacommand.cpp | |
54 | src/linetypes/object.cpp | |
15
9e18ec63eec3
split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents:
14
diff
changeset
|
55 | src/linetypes/quadrilateral.cpp |
14 | 56 | src/linetypes/subfilereference.cpp |
15
9e18ec63eec3
split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents:
14
diff
changeset
|
57 | src/linetypes/triangle.cpp |
16 | 58 | src/settingseditor/keyboardshortcutseditor.cpp |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
59 | src/settingseditor/librarieseditor.cpp |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
60 | src/settingseditor/settingseditor.cpp |
17 | 61 | src/types/boundingbox.cpp |
47 | 62 | src/ui/canvas.cpp |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
63 | src/ui/multiplyfactordialog.cpp |
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
64 | src/ui/objecteditor.cpp |
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
65 | src/ui/polygonobjecteditor.cpp |
39
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
66 | src/widgets/colorbutton.cpp |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
67 | src/widgets/colorselectdialog.cpp |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
68 | src/widgets/doublespinbox.cpp |
85
40e2940605a3
added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents:
81
diff
changeset
|
69 | src/widgets/matrixeditor.cpp |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
70 | src/widgets/vec3editor.cpp |
96 | 71 | src/tools/basetool.cpp |
72 | src/tools/selecttool.cpp | |
73 | src/tools/drawtool.cpp | |
0 | 74 | ) |
75 | set (LDFORGE_HEADERS | |
3 | 76 | src/basics.h |
77 | src/colors.h | |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
7
diff
changeset
|
78 | src/document.h |
3 | 79 | src/documentmanager.h |
63
f7dd937667a5
omg functional programming
Teemu Piippo <teemu@hecknology.net>
parents:
55
diff
changeset
|
80 | src/functional.h |
55 | 81 | src/geometry.h |
21 | 82 | src/header.h |
17 | 83 | src/invert.h |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
84 | src/libraries.h |
0 | 85 | src/main.h |
1 | 86 | src/mainwindow.h |
20 | 87 | src/maths.h |
3 | 88 | src/model.h |
89 | src/modeleditcontext.h | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
90 | src/parser.h |
17 | 91 | src/ring.h |
16 | 92 | src/uiutilities.h |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
7
diff
changeset
|
93 | src/utility.h |
1 | 94 | src/version.h |
69
a36913fc552a
begin work on axes program
Teemu Piippo <teemu@hecknology.net>
parents:
63
diff
changeset
|
95 | src/gl/axesprogram.h |
70 | 96 | src/gl/basicshaderprogram.h |
17 | 97 | src/gl/common.h |
98 | src/gl/compiler.h | |
53 | 99 | src/gl/gridprogram.h |
17 | 100 | src/gl/partrenderer.h |
14 | 101 | src/linetypes/comment.h |
102 | src/linetypes/conditionaledge.h | |
103 | src/linetypes/edge.h | |
104 | src/linetypes/errorline.h | |
105 | src/linetypes/metacommand.h | |
106 | src/linetypes/object.h | |
89 | 107 | src/linetypes/polygonobject.h |
108 | src/linetypes/propertygenerics.h | |
15
9e18ec63eec3
split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents:
14
diff
changeset
|
109 | src/linetypes/quadrilateral.h |
14 | 110 | src/linetypes/subfilereference.h |
15
9e18ec63eec3
split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents:
14
diff
changeset
|
111 | src/linetypes/triangle.h |
16 | 112 | src/settingseditor/keyboardshortcutseditor.h |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
113 | src/settingseditor/librarieseditor.h |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
114 | src/settingseditor/settingseditor.h |
17 | 115 | src/types/boundingbox.h |
47 | 116 | src/ui/canvas.h |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
117 | src/ui/multiplyfactordialog.h |
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
118 | src/ui/objecteditor.h |
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
119 | src/ui/polygonobjecteditor.h |
39
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
120 | src/widgets/colorbutton.h |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
121 | src/widgets/colorselectdialog.h |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
122 | src/widgets/doublespinbox.h |
85
40e2940605a3
added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents:
81
diff
changeset
|
123 | src/widgets/matrixeditor.h |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
124 | src/widgets/vec3editor.h |
96 | 125 | src/tools/selecttool.h |
126 | src/tools/basetool.h | |
127 | src/tools/drawtool.h | |
0 | 128 | ) |
129 | set (LDFORGE_FORMS | |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
7
diff
changeset
|
130 | src/document.ui |
1 | 131 | src/mainwindow.ui |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
132 | src/settingseditor/librarieseditor.ui |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
133 | src/settingseditor/settingseditor.ui |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
134 | src/ui/multiplyfactordialog.ui |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
135 | src/widgets/colorselectdialog.ui |
85
40e2940605a3
added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents:
81
diff
changeset
|
136 | src/widgets/matrixeditor.ui |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
137 | src/widgets/vec3editor.ui |
0 | 138 | ) |
6 | 139 | |
140 | set(LDFORGE_LOCALES | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
141 | locale/fi.ts |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
142 | locale/sv.ts |
6 | 143 | ) |
144 | ||
42
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
145 | set (LDFORGE_OTHER_FILES |
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
146 | src/configurationoptions.txt |
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
147 | ) |
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
148 | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
149 | set(LDFORGE_RESOURCES ldforge.qrc) |
39
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
150 | set(CMAKE_CXX_STANDARD 17) |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
151 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
152 | set(CMAKE_CXX_EXTENSIONS OFF) |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
153 | include_directories("${PROJECT_BINARY_DIR}") |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
154 | include_directories("${PROJECT_BINARY_DIR}/src") |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
155 | include_directories("${PROJECT_SOURCE_DIR}/src") |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
156 | |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
157 | # Translations |
104 | 158 | #qt5_create_translation(QM_FILES ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_FORMS} ${LDFORGE_LOCALES}) |
159 | #add_custom_target(translations ALL DEPENDS ${QM_FILES}) | |
10
e249d97c7fe6
fixed translations being updated twice at the same time, that's bad
Teemu Piippo <teemu@hecknology.net>
parents:
8
diff
changeset
|
160 | add_custom_target(resources ALL DEPENDS ${LDFORGE_RESOURCES}) |
6 | 161 | |
0 | 162 | if (NOT MSVC) |
163 | if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
164 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG") |
0 | 165 | endif() |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
166 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra") |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
167 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-fallthrough") |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
168 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") |
0 | 169 | endif() |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
170 | qt5_add_resources(LDFORGE_QRC ${LDFORGE_RESOURCES}) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
171 | qt5_wrap_ui(LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS}) |
6 | 172 | |
173 | # Move languages.qrc into the build directory to bake the .qm-files into LDForge | |
174 | # so that they don't have to be shipped separately | |
175 | # https://stackoverflow.com/a/34798124 | |
10
e249d97c7fe6
fixed translations being updated twice at the same time, that's bad
Teemu Piippo <teemu@hecknology.net>
parents:
8
diff
changeset
|
176 | # https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412 |
6 | 177 | set(LANGUAGES_QRC "languages.qrc") |
10
e249d97c7fe6
fixed translations being updated twice at the same time, that's bad
Teemu Piippo <teemu@hecknology.net>
parents:
8
diff
changeset
|
178 | configure_file(${LANGUAGES_QRC} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) |
6 | 179 | qt5_add_resources(LDFORGE_QM_RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_QRC}) |
28 | 180 | set_source_files_properties(${LDFORGE_LOCALES} PROPERTIES HEADER_FILE_ONLY TRUE) |
6 | 181 | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
182 | add_executable(ldforge WIN32 |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
183 | ${LDFORGE_SOURCES} |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
184 | ${LDFORGE_HEADERS} |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
185 | ${LDFORGE_RESOURCES} |
104 | 186 | #${LDFORGE_QRC} |
187 | #${LDFORGE_QM_RC_FILE} | |
28 | 188 | ${QM_FILES} |
0 | 189 | ${LDFORGE_FORMS_HEADERS} |
42
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
190 | ${LDFORGE_OTHER_FILES} |
41
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
191 | ${CMAKE_BINARY_DIR}/configuration.cpp |
0 | 192 | ) |
6 | 193 | |
0 | 194 | set_source_files_properties(${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE) |
6 | 195 | set_source_files_properties(${LDFORGE_RESOURCES} PROPERTIES HEADER_FILE_ONLY TRUE) |
42
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
196 | set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) |
0 | 197 | set_target_properties(ldforge PROPERTIES AUTOMOC 1) |
198 | target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES}) | |
100 | 199 | add_dependencies(ldforge resources) |
99
05ce5a34c497
disable cotire because it's messing up Qt Creator's Clang code model for me
Teemu Piippo <teemu@hecknology.net>
parents:
98
diff
changeset
|
200 | #cotire(ldforge) |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
201 | |
41
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
202 | add_custom_target (config_collection ALL |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
203 | COMMAND python3 |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
204 | "${CMAKE_SOURCE_DIR}/tools/configcollector.py" |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
205 | --header ${CMAKE_BINARY_DIR}/configuration.h |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
206 | --source ${CMAKE_BINARY_DIR}/configuration.cpp |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
207 | --sourcedir ${CMAKE_SOURCE_DIR}/src |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
208 | ${CMAKE_SOURCE_DIR}/src/configurationoptions.txt |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
209 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
210 | add_dependencies(ldforge config_collection) |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
211 | set_source_files_properties (${CMAKE_BINARY_DIR}/configuration.cpp PROPERTIES GENERATED TRUE) |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
212 | set_property(SOURCE configuration.cpp PROPERTY SKIP_AUTOGEN ON) |
0abada2a9802
added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents:
39
diff
changeset
|
213 | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
214 | # Collect the current hg revision into hginfo.h |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
215 | add_custom_target(revision_check ALL |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
216 | COMMAND python3 "${CMAKE_SOURCE_DIR}/tools/updaterevision.py" --cwd "$(CMAKE_SOURCE_DIR)" hginfo.h |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
217 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
218 | add_dependencies(ldforge revision_check) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
219 | |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
220 | install(TARGETS ldforge RUNTIME DESTINATION bin) |