CMakeLists.txt

Fri, 04 Mar 2022 23:00:06 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 04 Mar 2022 23:00:06 +0200
changeset 154
47cb50cfa9ad
parent 153
2f79053c2e9a
child 158
5bd755eaa5a8
permissions
-rw-r--r--

add missing files

0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 project(ldforge)
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
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
Teemu Piippo <teemu@hecknology.net>
parents: 20
diff changeset
5 set(OpenGL_GL_PREFERENCE GLVND)
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 find_package(Qt5Widgets REQUIRED)
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
7 if (Qt5Widgets_VERSION VERSION_LESS 5.5.0)
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
8 message(FATAL_ERROR "Qt5 version 5.5 required")
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
9 endif()
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 find_package(Qt5Core REQUIRED)
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 find_package(Qt5OpenGL REQUIRED)
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
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
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
14 find_package(GLM REQUIRED)
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
15 set(CMAKE_AUTOMOC ON)
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
16 set(CMAKE_AUTOUIC ON)
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
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
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
20 include_directories(${GLM_INCLUDE_DIR})
112
5760cbb32bc0 use QT_NO_KEYWORDS
Teemu Piippo <teemu@hecknology.net>
parents: 105
diff changeset
21 add_definitions(-DQT_NO_KEYWORDS)
94
164f53fb5921 added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents: 92
diff changeset
22 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
23 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
24 source_group("5 LDraw line types" REGULAR_EXPRESSION "src/linetypes/.+\\.(cpp|h|ui)")
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 150
diff changeset
25 source_group("5.1 LDraw algorithms" REGULAR_EXPRESSION "src/ldrawalgorithm.(cpp|h|ui)")
94
164f53fb5921 added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents: 92
diff changeset
26 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
27 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
28 source_group("3 User interface" REGULAR_EXPRESSION "src/(mainwindow|document|documentmanager|uiutilities)\\.(cpp|h|ui)")
153
2f79053c2e9a Renamed modeleditcontext.cpp -> modeleditor.cpp
Teemu Piippo <teemu@hecknology.net>
parents: 152
diff changeset
29 source_group("2 Model handling" REGULAR_EXPRESSION "src/(model|modeleditor|libraries|colors|parser|vertexmap|edithistory|polygoncache)\\.(cpp|h|ui)")
96
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
30 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
31
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
32 set (LDFORGE_SOURCES
26
3a9e761e4faa at least VAOs work now
Teemu Piippo <teemu@hecknology.net>
parents: 21
diff changeset
33 src/colors.cpp
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 7
diff changeset
34 src/document.cpp
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents: 2
diff changeset
35 src/documentmanager.cpp
133
e39326ee48dc Begin work on edit history
Teemu Piippo <teemu@hecknology.net>
parents: 127
diff changeset
36 src/edithistory.cpp
55
cb81ecb5fb23 grid stuff
Teemu Piippo <teemu@hecknology.net>
parents: 53
diff changeset
37 src/geometry.cpp
140
2f383e88acf4 work on saving
Teemu Piippo <teemu@hecknology.net>
parents: 136
diff changeset
38 src/header.cpp
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 150
diff changeset
39 src/ldrawalgorithm.cpp
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
40 src/libraries.cpp
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
41 src/invert.cpp
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
42 src/main.cpp
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
43 src/mainwindow.cpp
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents: 2
diff changeset
44 src/model.cpp
153
2f79053c2e9a Renamed modeleditcontext.cpp -> modeleditor.cpp
Teemu Piippo <teemu@hecknology.net>
parents: 152
diff changeset
45 src/modeleditor.cpp
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
46 src/parser.cpp
150
b6cbba6e29a1 extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents: 148
diff changeset
47 src/polygoncache.cpp
16
Teemu Piippo <teemu@hecknology.net>
parents: 15
diff changeset
48 src/uiutilities.cpp
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
49 src/version.cpp
117
121a40d5e34c Add vertex map
Teemu Piippo <teemu@hecknology.net>
parents: 114
diff changeset
50 src/vertexmap.cpp
69
a36913fc552a begin work on axes program
Teemu Piippo <teemu@hecknology.net>
parents: 63
diff changeset
51 src/gl/axesprogram.cpp
70
f21b800b02a4 Added axes rendering
Teemu Piippo <teemu@hecknology.net>
parents: 69
diff changeset
52 src/gl/basicshaderprogram.cpp
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
53 src/gl/compiler.cpp
53
3af627f7a40f added grid program
Teemu Piippo <teemu@hecknology.net>
parents: 47
diff changeset
54 src/gl/gridprogram.cpp
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
55 src/gl/partrenderer.cpp
118
8e1c9f18ae15 Add vertex rendering
Teemu Piippo <teemu@hecknology.net>
parents: 117
diff changeset
56 src/gl/vertexprogram.cpp
14
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
57 src/linetypes/comment.cpp
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
58 src/linetypes/conditionaledge.cpp
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
59 src/linetypes/edge.cpp
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
60 src/linetypes/errorline.cpp
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
61 src/linetypes/metacommand.cpp
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
62 src/linetypes/object.cpp
15
9e18ec63eec3 split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
63 src/linetypes/quadrilateral.cpp
14
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
64 src/linetypes/subfilereference.cpp
15
9e18ec63eec3 split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
65 src/linetypes/triangle.cpp
16
Teemu Piippo <teemu@hecknology.net>
parents: 15
diff changeset
66 src/settingseditor/keyboardshortcutseditor.cpp
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
67 src/settingseditor/librarieseditor.cpp
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
68 src/settingseditor/settingseditor.cpp
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
69 src/types/boundingbox.cpp
47
cd6704009eb9 picking works now
Teemu Piippo <teemu@hecknology.net>
parents: 42
diff changeset
70 src/ui/canvas.cpp
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
71 src/ui/multiplyfactordialog.cpp
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
72 src/ui/objecteditor.cpp
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
73 src/ui/polygonobjecteditor.cpp
39
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
74 src/widgets/colorbutton.cpp
94
164f53fb5921 added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents: 92
diff changeset
75 src/widgets/colorselectdialog.cpp
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
76 src/widgets/doublespinbox.cpp
85
40e2940605a3 added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
77 src/widgets/matrixeditor.cpp
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
78 src/widgets/vec3editor.cpp
96
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
79 src/tools/basetool.cpp
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
80 src/tools/selecttool.cpp
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
81 src/tools/drawtool.cpp
127
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents: 118
diff changeset
82 src/tools/transformtool.cpp
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
83 )
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
84 set (LDFORGE_HEADERS
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents: 2
diff changeset
85 src/basics.h
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents: 2
diff changeset
86 src/colors.h
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 7
diff changeset
87 src/document.h
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents: 2
diff changeset
88 src/documentmanager.h
133
e39326ee48dc Begin work on edit history
Teemu Piippo <teemu@hecknology.net>
parents: 127
diff changeset
89 src/edithistory.h
63
f7dd937667a5 omg functional programming
Teemu Piippo <teemu@hecknology.net>
parents: 55
diff changeset
90 src/functional.h
55
cb81ecb5fb23 grid stuff
Teemu Piippo <teemu@hecknology.net>
parents: 53
diff changeset
91 src/geometry.h
21
Teemu Piippo <teemu@hecknology.net>
parents: 20
diff changeset
92 src/header.h
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
93 src/invert.h
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 150
diff changeset
94 src/ldrawalgorithm.h
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
95 src/libraries.h
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
96 src/main.h
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
97 src/mainwindow.h
20
cef43609a374 fixed build
Teemu Piippo <teemu@hecknology.net>
parents: 18
diff changeset
98 src/maths.h
3
55a55a9ec2c2 Added lots of code
Teemu Piippo <teemu@hecknology.net>
parents: 2
diff changeset
99 src/model.h
153
2f79053c2e9a Renamed modeleditcontext.cpp -> modeleditor.cpp
Teemu Piippo <teemu@hecknology.net>
parents: 152
diff changeset
100 src/modeleditor.h
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
101 src/parser.h
150
b6cbba6e29a1 extract polygon cache out of Model
Teemu Piippo <teemu@hecknology.net>
parents: 148
diff changeset
102 src/polygoncache.h
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
103 src/ring.h
16
Teemu Piippo <teemu@hecknology.net>
parents: 15
diff changeset
104 src/uiutilities.h
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 7
diff changeset
105 src/utility.h
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
106 src/version.h
117
121a40d5e34c Add vertex map
Teemu Piippo <teemu@hecknology.net>
parents: 114
diff changeset
107 src/vertexmap.h
69
a36913fc552a begin work on axes program
Teemu Piippo <teemu@hecknology.net>
parents: 63
diff changeset
108 src/gl/axesprogram.h
70
f21b800b02a4 Added axes rendering
Teemu Piippo <teemu@hecknology.net>
parents: 69
diff changeset
109 src/gl/basicshaderprogram.h
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
110 src/gl/common.h
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
111 src/gl/compiler.h
53
3af627f7a40f added grid program
Teemu Piippo <teemu@hecknology.net>
parents: 47
diff changeset
112 src/gl/gridprogram.h
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
113 src/gl/partrenderer.h
118
8e1c9f18ae15 Add vertex rendering
Teemu Piippo <teemu@hecknology.net>
parents: 117
diff changeset
114 src/gl/vertexprogram.h
14
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
115 src/linetypes/comment.h
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
116 src/linetypes/conditionaledge.h
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
117 src/linetypes/edge.h
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
118 src/linetypes/errorline.h
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
119 src/linetypes/metacommand.h
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
120 src/linetypes/object.h
89
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 85
diff changeset
121 src/linetypes/polygonobject.h
7abaf1d64719 object editing
Teemu Piippo <teemu@hecknology.net>
parents: 85
diff changeset
122 src/linetypes/propertygenerics.h
15
9e18ec63eec3 split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
123 src/linetypes/quadrilateral.h
14
20d2ed3af73d renamings
Teemu Piippo <teemu@hecknology.net>
parents: 10
diff changeset
124 src/linetypes/subfilereference.h
15
9e18ec63eec3 split quadrilateral and triangle into their own source files
Teemu Piippo <teemu@hecknology.net>
parents: 14
diff changeset
125 src/linetypes/triangle.h
16
Teemu Piippo <teemu@hecknology.net>
parents: 15
diff changeset
126 src/settingseditor/keyboardshortcutseditor.h
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
127 src/settingseditor/librarieseditor.h
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
128 src/settingseditor/settingseditor.h
17
a5111f4e6412 added teapot rendering
Teemu Piippo <teemu@hecknology.net>
parents: 16
diff changeset
129 src/types/boundingbox.h
47
cd6704009eb9 picking works now
Teemu Piippo <teemu@hecknology.net>
parents: 42
diff changeset
130 src/ui/canvas.h
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
131 src/ui/multiplyfactordialog.h
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
132 src/ui/objecteditor.h
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
133 src/ui/polygonobjecteditor.h
39
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
134 src/widgets/colorbutton.h
94
164f53fb5921 added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents: 92
diff changeset
135 src/widgets/colorselectdialog.h
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
136 src/widgets/doublespinbox.h
85
40e2940605a3 added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
137 src/widgets/matrixeditor.h
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
138 src/widgets/vec3editor.h
96
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
139 src/tools/selecttool.h
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
140 src/tools/basetool.h
165777a20dc7 added tool base code
Teemu Piippo <teemu@hecknology.net>
parents: 94
diff changeset
141 src/tools/drawtool.h
127
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents: 118
diff changeset
142 src/tools/transformtool.h
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
143 )
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
144 set (LDFORGE_FORMS
8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents: 7
diff changeset
145 src/document.ui
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
146 src/mainwindow.ui
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
147 src/settingseditor/librarieseditor.ui
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
148 src/settingseditor/settingseditor.ui
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
149 src/ui/multiplyfactordialog.ui
94
164f53fb5921 added a color select dialog
Teemu Piippo <teemu@hecknology.net>
parents: 92
diff changeset
150 src/widgets/colorselectdialog.ui
85
40e2940605a3 added a matrix editing widget
Teemu Piippo <teemu@hecknology.net>
parents: 81
diff changeset
151 src/widgets/matrixeditor.ui
81
62373840e33a object editor widgets start to form up
Teemu Piippo <teemu@hecknology.net>
parents: 70
diff changeset
152 src/widgets/vec3editor.ui
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
153 )
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
154
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
155 set(LDFORGE_LOCALES
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
156 locale/fi.ts
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
157 locale/sv.ts
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
158 )
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
159
42
1d03dc1173cd made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents: 41
diff changeset
160 set (LDFORGE_OTHER_FILES
1d03dc1173cd made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents: 41
diff changeset
161 src/configurationoptions.txt
1d03dc1173cd made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents: 41
diff changeset
162 )
1d03dc1173cd made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents: 41
diff changeset
163
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
164 set(LDFORGE_RESOURCES ldforge.qrc)
148
e1ced2523cad reworking
Teemu Piippo <teemu@hecknology.net>
parents: 140
diff changeset
165 set(CMAKE_CXX_STANDARD 20)
39
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
166 set(CMAKE_CXX_STANDARD_REQUIRED ON)
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
167 set(CMAKE_CXX_EXTENSIONS OFF)
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
168 include_directories("${PROJECT_BINARY_DIR}")
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
169 include_directories("${PROJECT_BINARY_DIR}/src")
caac957e9834 Main color is now configurable
Teemu Piippo <teemu@hecknology.net>
parents: 33
diff changeset
170 include_directories("${PROJECT_SOURCE_DIR}/src")
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
171
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
172 # Translations
104
cd4df75924b7 Add connections
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
173 #qt5_create_translation(QM_FILES ${LDFORGE_SOURCES} ${LDFORGE_HEADERS} ${LDFORGE_FORMS} ${LDFORGE_LOCALES})
cd4df75924b7 Add connections
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
174 #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
175 add_custom_target(resources ALL DEPENDS ${LDFORGE_RESOURCES})
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
176
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
177 if (NOT MSVC)
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
178 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
179 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG")
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
180 endif()
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
181 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
182 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-implicit-fallthrough")
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
183 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type")
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
184 endif()
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
185 qt5_add_resources(LDFORGE_QRC ${LDFORGE_RESOURCES})
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
186 qt5_wrap_ui(LDFORGE_FORMS_HEADERS ${LDFORGE_FORMS})
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
187
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
188 # Move languages.qrc into the build directory to bake the .qm-files into LDForge
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
189 # so that they don't have to be shipped separately
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
190 # 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
191 # https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
192 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
193 configure_file(${LANGUAGES_QRC} ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
194 qt5_add_resources(LDFORGE_QM_RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${LANGUAGES_QRC})
28
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
195 set_source_files_properties(${LDFORGE_LOCALES} PROPERTIES HEADER_FILE_ONLY TRUE)
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
196
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
197 add_executable(ldforge WIN32
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
198 ${LDFORGE_SOURCES}
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
199 ${LDFORGE_HEADERS}
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
200 ${LDFORGE_RESOURCES}
104
cd4df75924b7 Add connections
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
201 #${LDFORGE_QRC}
cd4df75924b7 Add connections
Teemu Piippo <teemu@hecknology.net>
parents: 100
diff changeset
202 #${LDFORGE_QM_RC_FILE}
28
c92c1daf735f modelview matrix set up
Teemu Piippo <teemu@hecknology.net>
parents: 26
diff changeset
203 ${QM_FILES}
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
204 ${LDFORGE_FORMS_HEADERS}
42
1d03dc1173cd made configurationoptions.txt visible in Qt Creator
Teemu Piippo <teemu@hecknology.net>
parents: 41
diff changeset
205 ${LDFORGE_OTHER_FILES}
41
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
206 ${CMAKE_BINARY_DIR}/configuration.cpp
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
207 )
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
208
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
209 set_source_files_properties(${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE)
6
73e448b2943d language support
Teemu Piippo <teemu@hecknology.net>
parents: 3
diff changeset
210 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
211 set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
212 set_target_properties(ldforge PROPERTIES AUTOMOC 1)
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
213 target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES})
100
43ce3672648a fix build
Teemu Piippo <teemu@hecknology.net>
parents: 99
diff changeset
214 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
215 #cotire(ldforge)
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
216
41
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
217 add_custom_target (config_collection ALL
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
218 COMMAND python3
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
219 "${CMAKE_SOURCE_DIR}/tools/configcollector.py"
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
220 --header ${CMAKE_BINARY_DIR}/configuration.h
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
221 --source ${CMAKE_BINARY_DIR}/configuration.cpp
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
222 --sourcedir ${CMAKE_SOURCE_DIR}/src
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
223 ${CMAKE_SOURCE_DIR}/src/configurationoptions.txt
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
224 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
225 add_dependencies(ldforge config_collection)
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
226 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
227 set_property(SOURCE configuration.cpp PROPERTY SKIP_AUTOGEN ON)
0abada2a9802 added automated configuration collection
Teemu Piippo <teemu@hecknology.net>
parents: 39
diff changeset
228
114
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
229
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
230 add_custom_target(linelength ALL
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
231 COMMAND python3
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
232 "${CMAKE_SOURCE_DIR}/tools/linelength.py"
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
233 ${LDFORGE_SOURCES}
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
234 ${LDFORGE_HEADERS}
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
235 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
236 add_dependencies(ldforge linelength)
4e03b0e2a29f added build-time test for line length
Teemu Piippo <teemu@hecknology.net>
parents: 112
diff changeset
237
7
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
238 # Collect the current hg revision into hginfo.h
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
239 add_custom_target(revision_check ALL
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
240 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
241 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
242 add_dependencies(ldforge revision_check)
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
243
68443f5be176 added the settings editor
Teemu Piippo <teemu@hecknology.net>
parents: 6
diff changeset
244 install(TARGETS ldforge RUNTIME DESTINATION bin)

mercurial