mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-03 18:09:13 +03:00
Add hot reload support when building with GCC and CMake
(cherry picked from commit 05571971cc)
This commit is contained in:
@@ -124,10 +124,6 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (GODOT_ENABLE_HOT_RELOAD)
|
|
||||||
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -D HOT_RELOAD_ENABLED")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Generate source from the bindings file
|
# Generate source from the bindings file
|
||||||
find_package(Python3 3.4 REQUIRED) # pathlib should be present
|
find_package(Python3 3.4 REQUIRED) # pathlib should be present
|
||||||
if(GENERATE_TEMPLATE_GET_NODE)
|
if(GENERATE_TEMPLATE_GET_NODE)
|
||||||
@@ -170,6 +166,11 @@ target_compile_features(${PROJECT_NAME}
|
|||||||
cxx_std_17
|
cxx_std_17
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(GODOT_ENABLE_HOT_RELOAD)
|
||||||
|
target_compile_definitions(${PROJECT_NAME} PUBLIC HOT_RELOAD_ENABLED)
|
||||||
|
target_compile_options(${PROJECT_NAME} PUBLIC $<${compiler_is_gnu}:-fno-gnu-unique>)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
target_compile_definitions(${PROJECT_NAME} PUBLIC
|
||||||
$<$<CONFIG:Debug>:
|
$<$<CONFIG:Debug>:
|
||||||
DEBUG_ENABLED
|
DEBUG_ENABLED
|
||||||
|
|||||||
Reference in New Issue
Block a user