Skip to content

Commit 31179ee

Browse files
committed
Added hot reload support to CMakeLists.txt
1 parent 48afa82 commit 31179ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ project(godot-cpp LANGUAGES CXX)
4343
option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON)
4444
option(GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." ON)
4545
option(GODOT_CPP_WARNING_AS_ERROR "Treat warnings as errors" OFF)
46+
option(GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" OFF)
4647

4748
# Add path to modules
4849
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" )
@@ -116,6 +117,10 @@ else()
116117
endif()
117118
endif()
118119

120+
if (GODOT_ENABLE_HOT_RELOAD)
121+
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -D HOT_RELOAD_ENABLED")
122+
endif()
123+
119124
# Generate source from the bindings file
120125
find_package(Python3 3.4 REQUIRED) # pathlib should be present
121126
if(GENERATE_TEMPLATE_GET_NODE)

0 commit comments

Comments
 (0)