File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.16)
22
3+ if (NOT DEFINED CMAKE_BUILD_TYPE )
4+ set (cmake_build_type_undefined 1)
5+ endif ()
6+
37list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR} /cmake" )
48
59# See docs/release_checklist.md
@@ -26,6 +30,23 @@ else()
2630 set (SDLNET_ROOTPROJECT OFF )
2731endif ()
2832
33+ # By default, configure in RelWithDebInfo configuration
34+ if (SDLNET_ROOTPROJECT)
35+ get_property (is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
36+ if (is_multi_config)
37+ # The first item in CMAKE_CONFIGURATION_TYPES is the default configuration
38+ if (DEFINED CMAKE_CONFIGURATION_TYPES AND "RelWithDebInfo" IN_LIST CMAKE_CONFIGURATION_TYPES )
39+ list (REMOVE_ITEM CMAKE_CONFIGURATION_TYPES "RelWithDebInfo" )
40+ list (INSERT CMAKE_CONFIGURATION_TYPES 0 "RelWithDebInfo" )
41+ set (CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES} " CACHE STRING "CMake configuration types" FORCE)
42+ endif ()
43+ else ()
44+ if (cmake_build_type_undefined)
45+ set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "CMake build type" FORCE)
46+ endif ()
47+ endif ()
48+ endif ()
49+
2950set (SDLNET_SAMPLES_DEFAULT ${SDLNET_ROOTPROJECT} )
3051if (ANDROID)
3152 set (SDLNET_SAMPLES_DEFAULT OFF )
You can’t perform that action at this time.
0 commit comments