Skip to content

Commit

Permalink
Merge pull request #1548 from ytnuf/hot_reload
Browse files Browse the repository at this point in the history
Add hot reload support when building with GCC and CMake
  • Loading branch information
dsnopek authored Sep 10, 2024
2 parents d477589 + 0557197 commit f4d3817
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ else()
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
find_package(Python3 3.4 REQUIRED) # pathlib should be present
if(GENERATE_TEMPLATE_GET_NODE)
Expand Down Expand Up @@ -170,6 +166,11 @@ target_compile_features(${PROJECT_NAME}
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
$<$<CONFIG:Debug>:
DEBUG_ENABLED
Expand Down

0 comments on commit f4d3817

Please sign in to comment.