File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
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 supress 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#
@@ -43,7 +44,6 @@ project(godot-cpp LANGUAGES CXX)
4344option (GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON )
4445option (GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." ON )
4546option (GODOT_CPP_WARNING_AS_ERROR "Treat warnings as errors" OFF )
46- option (GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" OFF )
4747
4848# Add path to modules
4949list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake/" )
@@ -58,6 +58,13 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
5858set (CMAKE_BUILD_TYPE Debug)
5959endif ()
6060
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+
6168if (NOT DEFINED BITS)
6269set (BITS 32)
6370if (CMAKE_SIZEOF_VOID_P EQUAL 8)
You can’t perform that action at this time.
0 commit comments