Solve minor bug in global.json generation.
@@ -198,6 +198,12 @@ target_link_libraries(${target}
function(configurations_write config_dir config_path)
set(CONFIGURATION_GLOBAL "{")
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+ set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Debug\",")
+ elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
+ set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Error\",")
+ endif()
+
if(OPTION_BUILD_LOADERS)
set(CONFIGURATION_GLOBAL_LOADERS 0)
@@ -220,12 +226,6 @@ function(configurations_write config_dir config_path)
endif()
endif()
- if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
- set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Debug\"")
- elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
- set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n\t\"log_level\":\"Error\"")
- endif()
-
set(CONFIGURATION_GLOBAL "${CONFIGURATION_GLOBAL}\n}")
file(WRITE "${config_path}" "${CONFIGURATION_GLOBAL}")
