target_include_directories(${PLUGIN_TARGET_NAME} PRIVATE "~/Downloads/microsoft.web.webview2.1.0.705.50/build/native/include")
target_compile_definitions(${PLUGIN_TARGET_NAME}
PRIVATE
# JUCE_WEB_BROWSER and JUCE_USE_CURL would be on by default, but you might not need them.
JUCE_WEB_BROWSER=1 # If you remove this, add `NEEDS_WEB_BROWSER TRUE` to the `juce_add_plugin` call
JUCE_USE_WINRT_WEBVIEW=1
JUCE_USE_WIN_WEBVIEW2=1
)
Is this a valid CMake configuration? I haven’t seen anyone else
I got it working, by manually downloading the package from nuget - and extracting headers/binaries with WinRar.
Looks like the problem I had is the newer version of Juce was referencing a newer version of the webview package - so I downloaded a newer version
Hey there, thanks for the information. I’m currently struggling with that on Windows, I didn’t know about the non-compatibility with CMake and was trying to find a way to get it working, with no success so far
@tobiq Can you explain how you managed to get the package and install it please? I don’t find the Webview2.h header to make my project build.
Also when I try to build, I include <juce_gui_extra/juce_gui_extra.h> to use juce::WindowsWebView2WebBrowserComponent but then I get a build error on this file :
I fix it by renaming small in the enum but I wonder if it’s normal that I get this error, and also if I needed to include the header. My cmake is like that :
It requires to get the nuget.exe program from here NuGet Gallery | Downloads and add it to the path but then it works and everything builds fine
I still have the problem with the code in juce_PushNotifications.h though.
And I have an other issue on my side that I must solve to check if the weview appears correctly in the plugin. I’ll let you know if it works, but it’s already a major improvement for me!