Commit cc25ef6
committed
Modernise Existing CMakeLists.txt
== godot-cpp ==
Moved find package for python to root CMakeLists.txt
Silenced warning for unused CMAKE_C_COMPILER when specified in toolchain
Changed godot-cpp compile feature cxx_std_17 to PUBLIC to propagate to consumers
Changed the MSVC warning flags to PUBLIC to propagate to consumers
Turn on WINDOWS_ENABLED based on WIN32, not IS_MSVC
New cmake/sources.cmake to collect all the pre-existing source files, because globing is evil.
Made all godot-cpp sources PRIVATE
Exposed headers as INTERFACE using target_include_directories for consumers
### Generator Expressions
Renamed generator expression helper variables to ease readability
Moved all flags to generator expressions
Moved generator expression helpers to common_compiler_flags.cmake
Refactor SYSTEM_NAME and BUILD_TYPE to use generator expressions
Refactor HOT_RELOAD to use generator expressions
CMAKE_BUILD_TYPE is no longer depended upon, eliminating config errors for multi-config builds like Visual Studio, and Ninja-MultiConfig
Now that we are specifying the config at build time, the hack to re-write CMAKE_CXX_FLAGS(_DEBUG) flags is no longer needed.
Remove CMAKE_BUILD_TYPE from msvc CI target as it is a Multi-Config generator and ignores it
### test as a target
Update test/CmakeLists.txt to use target_link_libraries to pull in required things from godot-cpp target
Add EXCLUDE_FROM_ALL to godot-cpp-test so that it isn't built as part of the 'all' target
== godot-cpp-test ==
updated ci to build the godot-cpp-test target from the root directory using cmake
Adding the LANGUAGES CXX to the test project maintains the existing behavior of not checking for C compiler during configure.
Removed majority of the cmake code as it was duplicating things that propagate as transient dependency from godot-cpp1 parent 355e16a commit cc25ef6
File tree
6 files changed
+267
-284
lines changed- .github/workflows
- cmake
- test
6 files changed
+267
-284
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
230 | 229 | | |
231 | 230 | | |
232 | 231 | | |
| |||
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
248 | | - | |
| 247 | + | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | | - | |
253 | | - | |
| 251 | + | |
254 | 252 | | |
255 | 253 | | |
256 | 254 | | |
| |||
263 | 261 | | |
264 | 262 | | |
265 | 263 | | |
266 | | - | |
267 | | - | |
| 264 | + | |
| 265 | + | |
268 | 266 | | |
269 | 267 | | |
270 | 268 | | |
271 | | - | |
272 | | - | |
| 269 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
12 | 9 | | |
13 | 10 | | |
| 11 | + | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
8 | 25 | | |
9 | 26 | | |
10 | | - | |
| 27 | + | |
| 28 | + | |
11 | 29 | | |
12 | | - | |
| 30 | + | |
13 | 31 | | |
14 | 32 | | |
15 | 33 | | |
| |||
23 | 41 | | |
24 | 42 | | |
25 | 43 | | |
| 44 | + | |
26 | 45 | | |
| 46 | + | |
27 | 47 | | |
28 | 48 | | |
29 | | - | |
| 49 | + | |
30 | 50 | | |
31 | 51 | | |
32 | 52 | | |
33 | 53 | | |
34 | 54 | | |
35 | 55 | | |
| 56 | + | |
| 57 | + | |
36 | 58 | | |
37 | 59 | | |
38 | 60 | | |
39 | | - | |
| 61 | + | |
40 | 62 | | |
41 | 63 | | |
42 | 64 | | |
43 | 65 | | |
44 | 66 | | |
45 | | - | |
| 67 | + | |
46 | 68 | | |
47 | 69 | | |
48 | 70 | | |
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
53 | | - | |
54 | | - | |
| 75 | + | |
55 | 76 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
62 | 81 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 82 | + | |
| 83 | + | |
66 | 84 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 85 | + | |
| 86 | + | |
70 | 87 | | |
71 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
72 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
73 | 122 | | |
74 | 123 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
0 commit comments