Wed, 22 Jun 2022 16:53:35 +0300
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
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}) |
112 | 21 | add_definitions(-DQT_NO_KEYWORDS) |
191
d355d4c52d51
made editing tools not a polymorphic class tree
Teemu Piippo <teemu@hecknology.net>
parents:
186
diff
changeset
|
22 | source_group("LDForge" REGULAR_EXPRESSION "src/.+\\.(cpp|h|ui)") |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
23 | |
0 | 24 | set (LDFORGE_SOURCES |
26 | 25 | src/colors.cpp |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
7
diff
changeset
|
26 | src/document.cpp |
3 | 27 | src/documentmanager.cpp |
55 | 28 | src/geometry.cpp |
152 | 29 | src/ldrawalgorithm.cpp |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
30 | src/libraries.cpp |
17 | 31 | src/invert.cpp |
0 | 32 | src/main.cpp |
235
7ef03c2b46ab
Add a basic message log
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
233
diff
changeset
|
33 | src/messagelog.cpp |
3 | 34 | src/model.cpp |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
35 | src/parser.cpp |
150
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
148
diff
changeset
|
36 | src/polygoncache.cpp |
16 | 37 | src/uiutilities.cpp |
1 | 38 | src/version.cpp |
117 | 39 | src/vertexmap.cpp |
69
a36913fc552a
begin work on axes program
Teemu Piippo <teemu@hecknology.net>
parents:
63
diff
changeset
|
40 | src/gl/axesprogram.cpp |
70 | 41 | src/gl/basicshaderprogram.cpp |
17 | 42 | src/gl/compiler.cpp |
237
10a6298f636f
Add an option to log opengl messages
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
235
diff
changeset
|
43 | src/gl/debug.cpp |
216
c7241f504117
Reworked grid program into a render layer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
215
diff
changeset
|
44 | src/gl/gridprogram.cpp |
17 | 45 | src/gl/partrenderer.cpp |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
214
diff
changeset
|
46 | # src/gl/vertexprogram.cpp |
16 | 47 | src/settingseditor/keyboardshortcutseditor.cpp |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
48 | src/settingseditor/librarieseditor.cpp |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
49 | src/settingseditor/settingseditor.cpp |
17 | 50 | src/types/boundingbox.cpp |
233 | 51 | src/ui/circletooloptionswidget.cpp |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
52 | src/ui/multiplyfactordialog.cpp |
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
53 | src/ui/objecteditor.cpp |
39
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
54 | src/widgets/colorbutton.cpp |
178 | 55 | src/widgets/colorindexinput.cpp |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
56 | src/widgets/colorselectdialog.cpp |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
57 | src/widgets/doublespinbox.cpp |
85
40e2940605a3
added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents:
81
diff
changeset
|
58 | src/widgets/matrixeditor.cpp |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
59 | src/widgets/vec3editor.cpp |
0 | 60 | ) |
61 | set (LDFORGE_HEADERS | |
3 | 62 | src/basics.h |
232
8efa3a33172e
Add base code for circular primitives
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
223
diff
changeset
|
63 | src/circularprimitive.h |
3 | 64 | src/colors.h |
8
44679e468ba9
major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
7
diff
changeset
|
65 | src/document.h |
3 | 66 | src/documentmanager.h |
63
f7dd937667a5
omg functional programming
Teemu Piippo <teemu@hecknology.net>
parents:
55
diff
changeset
|
67 | src/functional.h |
55 | 68 | src/geometry.h |
17 | 69 | src/invert.h |
152 | 70 | src/ldrawalgorithm.h |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
71 | src/libraries.h |
235
7ef03c2b46ab
Add a basic message log
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
233
diff
changeset
|
72 | src/messagelog.h |
3 | 73 | src/model.h |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
74 | src/parser.h |
150
b6cbba6e29a1
extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents:
148
diff
changeset
|
75 | src/polygoncache.h |
17 | 76 | src/ring.h |
218
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
77 | src/settings.h |
63125c36de73
Replace config collector with a simpler system
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
216
diff
changeset
|
78 | src/typeconversions.h |
16 | 79 | src/uiutilities.h |
1 | 80 | src/version.h |
117 | 81 | src/vertexmap.h |
223
ce81db996275
Use Mapbox's ear clipping algorithm to handle drawing any simple polygon
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
221
diff
changeset
|
82 | src/algorithm/earcut.h |
69
a36913fc552a
begin work on axes program
Teemu Piippo <teemu@hecknology.net>
parents:
63
diff
changeset
|
83 | src/gl/axesprogram.h |
70 | 84 | src/gl/basicshaderprogram.h |
17 | 85 | src/gl/common.h |
86 | src/gl/compiler.h | |
237
10a6298f636f
Add an option to log opengl messages
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
235
diff
changeset
|
87 | src/gl/debug.h |
216
c7241f504117
Reworked grid program into a render layer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
215
diff
changeset
|
88 | src/gl/gridprogram.h |
17 | 89 | src/gl/partrenderer.h |
215
34c6e7bc4ee1
Reimplement the axes program as a layer that can be added to PartRenderer
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
214
diff
changeset
|
90 | # src/gl/vertexprogram.h |
16 | 91 | src/settingseditor/keyboardshortcutseditor.h |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
92 | src/settingseditor/librarieseditor.h |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
93 | src/settingseditor/settingseditor.h |
17 | 94 | src/types/boundingbox.h |
233 | 95 | src/ui/circletooloptionswidget.h |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
96 | src/ui/multiplyfactordialog.h |
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
97 | src/ui/objecteditor.h |
39
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
98 | src/widgets/colorbutton.h |
178 | 99 | src/widgets/colorindexinput.h |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
100 | src/widgets/colorselectdialog.h |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
101 | src/widgets/doublespinbox.h |
85
40e2940605a3
added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents:
81
diff
changeset
|
102 | src/widgets/matrixeditor.h |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
103 | src/widgets/vec3editor.h |
0 | 104 | ) |
105 | set (LDFORGE_FORMS | |
1 | 106 | src/mainwindow.ui |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
107 | src/settingseditor/librarieseditor.ui |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
108 | src/settingseditor/settingseditor.ui |
232
8efa3a33172e
Add base code for circular primitives
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
223
diff
changeset
|
109 | src/ui/circletool.ui |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
110 | src/ui/multiplyfactordialog.ui |
182
27fb1c3c9fbb
add ui file to object editor
Teemu Piippo <teemu@hecknology.net>
parents:
180
diff
changeset
|
111 | src/ui/objecteditor.ui |
94
164f53fb5921
added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents:
92
diff
changeset
|
112 | src/widgets/colorselectdialog.ui |
178 | 113 | src/widgets/colorindexinput.ui |
85
40e2940605a3
added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents:
81
diff
changeset
|
114 | src/widgets/matrixeditor.ui |
81
62373840e33a
object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents:
70
diff
changeset
|
115 | src/widgets/vec3editor.ui |
0 | 116 | ) |
6 | 117 | |
118 | set(LDFORGE_LOCALES | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
119 | locale/fi.ts |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
120 | locale/sv.ts |
6 | 121 | ) |
122 | ||
42
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
123 | set (LDFORGE_OTHER_FILES |
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
124 | ) |
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
125 | |
232
8efa3a33172e
Add base code for circular primitives
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
223
diff
changeset
|
126 | set(CMAKE_AUTOUIC_SEARCH_PATHS src/ui) |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
127 | set(LDFORGE_RESOURCES ldforge.qrc) |
148 | 128 | set(CMAKE_CXX_STANDARD 20) |
39
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
129 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
130 | set(CMAKE_CXX_EXTENSIONS OFF) |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
131 | include_directories("${PROJECT_BINARY_DIR}") |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
132 | include_directories("${PROJECT_BINARY_DIR}/src") |
caac957e9834
Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents:
33
diff
changeset
|
133 | include_directories("${PROJECT_SOURCE_DIR}/src") |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
134 | |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
135 | # Translations |
104 | 136 | #qt5_create_translation(QM_FILES ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_FORMS} ${LDFORGE_LOCALES}) |
137 | #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
|
138 | add_custom_target(resources ALL DEPENDS ${LDFORGE_RESOURCES}) |
6 | 139 | |
0 | 140 | if (NOT MSVC) |
141 | 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
|
142 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG") |
0 | 143 | endif() |
250
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
144 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wunused") |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
145 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-fallthrough") |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
146 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") |
250
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
147 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat-nonliteral -Wnonnull -Wnonnull-compare -Wnull-dereference -Winfinite-recursion -Wunused-const-variable=1 -Wuninitialized -Wsuggest-attribute=noreturn -Wmissing-noreturn -Wsuggest-attribute=malloc") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
148 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wduplicated-branches -Wshadow") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
149 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunsafe-loop-optimizations -Wundef -Wmissing-field-initializers") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
150 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-qual -Wcast-align -Wcast-function-type -Wconversion") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
151 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmissing-declarations -Wdate-time") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
152 | endif() |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
153 | if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
154 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcovered-switch-default -Wextra-semi -Wgnu -Wmicrosoft") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
155 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wsometimes-uninitialized -Wstring-concatenation -Wstring-conversion -Wsuggest-override") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
156 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override -Wundefined-func-template -Wundefined-reinterpret-cast") |
2837b549e616
I felt that the compiler was too kind to me, so I enabled a big pile of warnings
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
237
diff
changeset
|
157 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wuninitialized-const-reference -Wunreachable-code -Wunreachable-code-break -Wunreachable-code-return") |
0 | 158 | endif() |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
159 | qt5_add_resources(LDFORGE_QRC ${LDFORGE_RESOURCES}) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
160 | qt5_wrap_ui(LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS}) |
6 | 161 | |
162 | # Move languages.qrc into the build directory to bake the .qm-files into LDForge | |
163 | # so that they don't have to be shipped separately | |
164 | # 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
|
165 | # https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412 |
6 | 166 | 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
|
167 | configure_file(${LANGUAGES_QRC} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) |
6 | 168 | qt5_add_resources(LDFORGE_QM_RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_QRC}) |
28 | 169 | set_source_files_properties(${LDFORGE_LOCALES} PROPERTIES HEADER_FILE_ONLY TRUE) |
6 | 170 | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
171 | add_executable(ldforge WIN32 |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
172 | ${LDFORGE_SOURCES} |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
173 | ${LDFORGE_HEADERS} |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
174 | ${LDFORGE_RESOURCES} |
158
5bd755eaa5a8
Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
153
diff
changeset
|
175 | ${LDFORGE_QRC} |
104 | 176 | #${LDFORGE_QM_RC_FILE} |
28 | 177 | ${QM_FILES} |
0 | 178 | ${LDFORGE_FORMS_HEADERS} |
42
1d03dc1173cd
made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents:
41
diff
changeset
|
179 | ${LDFORGE_OTHER_FILES} |
0 | 180 | ) |
6 | 181 | |
0 | 182 | set_source_files_properties(${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE) |
6 | 183 | 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
|
184 | set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) |
0 | 185 | set_target_properties(ldforge PROPERTIES AUTOMOC 1) |
186 | target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES}) | |
100 | 187 | 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
|
188 | #cotire(ldforge) |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
189 | |
114
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
190 | add_custom_target(linelength ALL |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
191 | COMMAND python3 |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
192 | "${CMAKE_SOURCE_DIR}/tools/linelength.py" |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
193 | ${LDFORGE_SOURCES} |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
194 | ${LDFORGE_HEADERS} |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
195 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
196 | add_dependencies(ldforge linelength) |
4e03b0e2a29f
added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents:
112
diff
changeset
|
197 | |
7
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
198 | # Collect the current hg revision into hginfo.h |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
199 | add_custom_target(revision_check ALL |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
200 | 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
|
201 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
202 | add_dependencies(ldforge revision_check) |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
203 | |
68443f5be176
added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents:
6
diff
changeset
|
204 | install(TARGETS ldforge RUNTIME DESTINATION bin) |