diff --git a/CMakeLists.txt b/CMakeLists.txt index fb444538..c4720f06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,11 +111,6 @@ elseif(NOT CMAKE_BUILD_TYPE MATCHES "^(Release|Debug|RelWithDebInfo|MinSizeRel)$ message(FATAL_ERROR "Invalid CMAKE_BUILD_TYPE: '${CMAKE_BUILD_TYPE}', must be one of: 'Release', 'Debug', 'RelWithDebInfo' or 'MinSizeRel'") endif() -# Link debug libs for RelWithDebInfo -if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "Debug") -endif() - set(MSYS OFF) if(NOT "$ENV{MSYSTEM_PREFIX}" STREQUAL "") set(MSYS ON) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index 9af46528..4934f60b 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -23,7 +23,7 @@ if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg") if(VCPKG_TARGET_TRIPLET MATCHES -static) set(arch_suffix -static) endif() - if(CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(path_prefix debug) endif() set(installed_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/${path_prefix}) diff --git a/cmake/Options.cmake b/cmake/Options.cmake index c4cd2a75..0721b585 100644 --- a/cmake/Options.cmake +++ b/cmake/Options.cmake @@ -72,13 +72,6 @@ if(TRANSLATIONS_ONLY) set(ENABLE_LINK_DEFAULT OFF) else() find_package(SFML 2.4 COMPONENTS network system) - if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") - if(SFML_STATIC_LIBRARIES AND SFML_NETWORK_LIBRARY_STATIC_DEBUG AND SFML_SYSTEM_LIBRARY_STATIC_DEBUG) - set(SFML_LIBRARIES ${SFML_NETWORK_LIBRARY_STATIC_DEBUG} ${SFML_SYSTEM_LIBRARY_STATIC_DEBUG}) - elseif(SFML_NETWORK_LIBRARY_DYNAMIC_DEBUG AND SFML_SYSTEM_LIBRARY_DYNAMIC_DEBUG) - set(SFML_LIBRARIES ${SFML_NETWORK_LIBRARY_DYNAMIC_DEBUG} ${SFML_SYSTEM_LIBRARY_DYNAMIC_DEBUG}) - endif() - endif() set(ENABLE_LINK_DEFAULT OFF) if(SFML_FOUND) set(ENABLE_LINK_DEFAULT ON) diff --git a/cmake/Set-Toolchain-vcpkg.cmake b/cmake/Set-Toolchain-vcpkg.cmake index 1152154f..bcefe78b 100644 --- a/cmake/Set-Toolchain-vcpkg.cmake +++ b/cmake/Set-Toolchain-vcpkg.cmake @@ -576,14 +576,4 @@ endfunction() vcpkg_set_toolchain() -# Make vcpkg use debug libs for RelWithDebInfo -set(orig_build_type ${CMAKE_BUILD_TYPE}) - -if(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) - set(CMAKE_BUILD_TYPE Debug) -endif() - include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake) - -set(CMAKE_BUILD_TYPE ${orig_build_type}) -unset(orig_build_type) diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index b095bb3e..421ac9e9 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -247,7 +247,7 @@ function(configure_wx_target target) _add_include_directories(${wxWidgets_INCLUDE_DIRS}) _add_compile_options(${wxWidgets_CXX_FLAGS}) _add_compile_definitions(${wxWidgets_DEFINITIONS}) - if(CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") _add_compile_definitions(${wxWidgets_DEFINITIONS_DEBUG}) endif()