Assume release CEF build by default under Unix

This prevents wxWebViewChromium from referencing debug-only functions
that are not defined in the release build of libcef_dll_wrapper.

Unfortunately, CEF build doesn't provide any way to detect if the
wrappers were built in debug or in release mode, so just assume the
latter and add --enable-cef-debug configure option to build with a debug
build of CEF wrapper if necessary.
This commit is contained in:
Vadim Zeitlin 2023-09-19 00:36:07 +02:00
parent b5e278c0eb
commit 4816448cff
5 changed files with 71 additions and 1 deletions

37
configure vendored
View file

@ -1240,6 +1240,7 @@ enable_printarch
enable_svg
enable_webview
enable_webviewchromium
enable_cef_debug
enable_graphics_ctx
enable_graphics_d2d
enable_clipboard
@ -2210,6 +2211,7 @@ Optional Features:
--enable-svg use wxSVGFileDC device context
--enable-webview use wxWebView library
--enable-webviewchromium use wxWebView Chromium backend
--enable-cef_debug use debug build of CEF wrapper
--enable-graphics_ctx use graphics context 2D drawing API
--enable-graphics-d2d use Direct2D-based graphics context
--enable-clipboard use wxClipboard class
@ -8857,6 +8859,36 @@ fi
eval "$wx_cv_use_webviewchromium"
enablestring=
defaultval=
if test -z "$defaultval"; then
if test x"$enablestring" = xdisable; then
defaultval=yes
else
defaultval=no
fi
fi
# Check whether --enable-cef_debug was given.
if test "${enable_cef_debug+set}" = set; then :
enableval=$enable_cef_debug;
if test "$enableval" = yes; then
wx_cv_use_cef_debug='wxUSE_CEF_DEBUG=yes'
else
wx_cv_use_cef_debug='wxUSE_CEF_DEBUG=no'
fi
else
wx_cv_use_cef_debug='wxUSE_CEF_DEBUG=${'DEFAULT_wxUSE_CEF_DEBUG":-$defaultval}"
fi
eval "$wx_cv_use_cef_debug"
if test "$wxUSE_MAC" != 1; then
enablestring=
@ -39810,6 +39842,11 @@ $as_echo "$wx_cv_lib_cef" >&6; }
USE_WEBVIEW_CHROMIUM=1
$as_echo "#define wxUSE_WEBVIEW_CHROMIUM 1" >>confdefs.h
if test "$wxUSE_CEF_DEBUG" = "yes"; then
$as_echo "#define wxHAVE_CEF_DEBUG 1" >>confdefs.h
fi
else
as_fn_error $? "CEF not detected: $cef_error