diff options
author | Joakim Stien <joakim.stien@icloud.com> | 2023-12-10 11:25:38 +0100 |
---|---|---|
committer | Joakim Stien <joakim.stien@icloud.com> | 2023-12-10 11:25:38 +0100 |
commit | 0a078d9ec95baba15783bfe4159b6377380cb3cf (patch) | |
tree | 7d819e5f38d62347dcf149a7324995be255cfb6b | |
parent | 31179ee47c9b6a0d59dc09467b5c2619e6853427 (diff) | |
download | redot-cpp-0a078d9ec95baba15783bfe4159b6377380cb3cf.tar.gz |
PR comments — added doc, default 'ON' in Debug, 'OFF' in Release
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ba159f..11f6c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ # GODOT_GDEXTENSION_DIR: Path to the directory containing GDExtension interface header and API JSON file # GODOT_CPP_SYSTEM_HEADERS Mark the header files as SYSTEM. This may be useful to supress warnings in projects including this one. # GODOT_CPP_WARNING_AS_ERROR Treat any warnings as errors +# GODOT_ENABLE_HOT_RELOAD Build with hot reload support. Defaults to YES for Debug-builds and NO for Release-builds. # GODOT_CUSTOM_API_FILE: Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`) # FLOAT_PRECISION: Floating-point precision level ("single", "double") # @@ -43,7 +44,6 @@ project(godot-cpp LANGUAGES CXX) option(GENERATE_TEMPLATE_GET_NODE "Generate a template version of the Node class's get_node." ON) option(GODOT_CPP_SYSTEM_HEADERS "Expose headers as SYSTEM." ON) option(GODOT_CPP_WARNING_AS_ERROR "Treat warnings as errors" OFF) -option(GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" OFF) # Add path to modules list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" ) @@ -58,6 +58,13 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE Debug) endif() +# Hot reload is enabled by default in Debug-builds +if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + option(GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" ON) +else() + option(GODOT_ENABLE_HOT_RELOAD "Build with hot reload support" OFF) +endif() + if(NOT DEFINED BITS) set(BITS 32) if(CMAKE_SIZEOF_VOID_P EQUAL 8) |