From 02741a6c92beb10a6d683ed07e9f2ef9dd1eaeac Mon Sep 17 00:00:00 2001 From: kkocdko <31189892+kkocdko@users.noreply.github.com> Date: Sat, 16 Apr 2022 14:48:34 +0800 Subject: [PATCH] CMake: Fix build with wxBUILD_MONOLITHIC Add wxUSE_WEBVIEW test before using wx_webview_copy_webview2_loader. Closes #22315, #22316. --- build/cmake/lib/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt index 20906d2d7a..04f576383c 100644 --- a/build/cmake/lib/CMakeLists.txt +++ b/build/cmake/lib/CMakeLists.txt @@ -96,7 +96,9 @@ if(wxBUILD_MONOLITHIC) foreach(dep ${wxMONO_DEPENDENCIES}) add_dependencies(wxmono ${dep}) endforeach() - wx_webview_copy_webview2_loader(wxmono) + if(wxUSE_WEBVIEW) + wx_webview_copy_webview2_loader(wxmono) + endif() endif() # Propagate variable(s) to parent scope