From 0fa605abb5f4c4dcdb36bc29c1ba45122c89c16e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Jan 2024 02:13:46 +0100 Subject: [PATCH] Only use CMAKE_BUILD_TYPE to set wxHAVE_CEF_DEBUG if it's defined If it isn't, as is the case for MSVS for example, we don't need to set wxHAVE_CEF_DEBUG anyhow, as it's set automatically if _DEBUG is defined during the build. Co-Authored-By: Maarten Bent --- build/cmake/setup.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/cmake/setup.cmake b/build/cmake/setup.cmake index 59899bff9a..240fc808a6 100644 --- a/build/cmake/setup.cmake +++ b/build/cmake/setup.cmake @@ -613,7 +613,8 @@ check_type_size(ssize_t SSIZE_T) test_big_endian(WORDS_BIGENDIAN) -if(wxUSE_WEBVIEW_CHROMIUM) +# For generators using build type, ensure that wxHAVE_CEF_DEBUG matches it. +if(wxUSE_WEBVIEW_CHROMIUM AND DEFINED CMAKE_BUILD_TYPE) string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) if(${build_type} STREQUAL DEBUG) set(wxHAVE_CEF_DEBUG ON)