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 <MaartenBent@users.noreply.github.com>
This commit is contained in:
Vadim Zeitlin 2024-01-20 02:13:46 +01:00
parent b3c1a6adfd
commit 0fa605abb5

View file

@ -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)