From 7599a6e05b0605f1c6545aab8a21d35e8537b321 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 17 May 2024 15:11:42 +0200 Subject: [PATCH] Fix webview msvc build Signed-off-by: falkTX --- cmake/DPF-plugin.cmake | 9 +++++++-- distrho/extra/WebViewWin32.hpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/DPF-plugin.cmake b/cmake/DPF-plugin.cmake index a1d28377..de15ab0e 100644 --- a/cmake/DPF-plugin.cmake +++ b/cmake/DPF-plugin.cmake @@ -996,8 +996,13 @@ function(dpf__add_plugin_specific_ui_sources NAME USE_WEB_VIEW) elseif(WIN32 AND USE_WEB_VIEW) target_sources("${NAME}" PRIVATE "${DPF_ROOT_DIR}/distrho/DistrhoUI_win32.cpp") - set_source_files_properties("${DPF_ROOT_DIR}/distrho/DistrhoUI_win32.cpp" - PROPERTIES COMPILE_FLAGS -std=gnu++17) + if (MSVC) + set_source_files_properties("${DPF_ROOT_DIR}/distrho/DistrhoUI_win32.cpp" + PROPERTIES COMPILE_FLAGS /std:c++17) + else() + set_source_files_properties("${DPF_ROOT_DIR}/distrho/DistrhoUI_win32.cpp" + PROPERTIES COMPILE_FLAGS -std=gnu++17) + endif() endif() endfunction() diff --git a/distrho/extra/WebViewWin32.hpp b/distrho/extra/WebViewWin32.hpp index a686ccfb..4b005e2b 100644 --- a/distrho/extra/WebViewWin32.hpp +++ b/distrho/extra/WebViewWin32.hpp @@ -24,7 +24,7 @@ START_NAMESPACE_DISTRHO -struct WebView; +class WebView; WebView* webview_choc_create(const WebViewOptions& opts); void webview_choc_destroy(WebView*);