File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,17 @@ function is run.
36
36
37
37
The CMake equivalent is below.
38
38
]=======================================================================]
39
-
40
39
include (cmake/godotcpp.cmake )
41
40
42
41
godotcpp_options ()
43
42
43
+ #[[ People are compiling godot by itself and expecting template_debug
44
+ Replace this with PROJECT_IS_TOP_LEVEL, <PROJECT-NAME>_IS_TOP_LEVEL when minimum reaches 3.21
45
+ ]]
46
+ if (NOT PROJECT_NAME )
47
+ set (GODOTCPP_IS_TOP_LEVEL ON )
48
+ endif ()
49
+
44
50
# Define our project.
45
51
project (
46
52
godot-cpp
Original file line number Diff line number Diff line change @@ -330,8 +330,17 @@ function(godotcpp_generate)
330
330
"$<$<NOT:${THREADS_ENABLED} >:.nothreads>"
331
331
)
332
332
333
+ # People are compiling godot by itself.
334
+ set (EXCLUDE EXCLUDE_FROM_ALL )
335
+ if (GODOTCPP_IS_TOP_LEVEL )
336
+ if (TARGET_ALIAS STREQUAL template_debug )
337
+ set (EXCLUDE "" )
338
+ endif ()
339
+ endif ()
340
+
333
341
# the godot-cpp.* library targets
334
- add_library (${TARGET_NAME} STATIC EXCLUDE_FROM_ALL )
342
+ add_library (${TARGET_NAME} STATIC ${EXCLUDE} )
343
+
335
344
add_library (godot-cpp::${TARGET_ALIAS} ALIAS ${TARGET_NAME} )
336
345
337
346
file (GLOB_RECURSE GODOTCPP_SOURCES LIST_DIRECTORIES NO CONFIGURE_DEPENDS src/*.cpp )
You can’t perform that action at this time.
0 commit comments