File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 55# GODOT_GDEXTENSION_DIR: Path to the directory containing GDExtension interface header and API JSON file
66# GODOT_CPP_SYSTEM_HEADERS Mark the header files as SYSTEM. This may be useful to suppress warnings in projects including this one.
77# GODOT_CPP_WARNING_AS_ERROR Treat any warnings as errors
8+ # GODOT_ENABLE_HOT_RELOAD Build with hot reload support. Defaults to YES for Debug-builds and NO for Release-builds.
89# GODOT_CUSTOM_API_FILE: Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`)
910# FLOAT_PRECISION: Floating-point precision level ("single", "double")
1011#
@@ -57,6 +58,13 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
5758 set (CMAKE_BUILD_TYPE Debug)
5859endif ()
5960
61+ # Hot reload is enabled by default in Debug-builds
62+ if ("${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
63+ option (GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" ON )
64+ else ()
65+ option (GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" OFF )
66+ endif ()
67+
6068if (NOT DEFINED BITS)
6169 set (BITS 32)
6270 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -116,6 +124,10 @@ else()
116124 endif ()
117125endif ()
118126
127+ if (GODOT_ENABLE_HOT_RELOAD)
128+ set (GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -D HOT_RELOAD_ENABLED" )
129+ endif ()
130+
119131# Generate source from the bindings file
120132find_package (Python3 3.4 REQUIRED) # pathlib should be present
121133if (GENERATE_TEMPLATE_GET_NODE)
You can’t perform that action at this time.
0 commit comments