mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Make WebView2 installation instructions more robust
This commit is contained in:
parent
2cdb78e3e5
commit
b9cb7d4fe3
2 changed files with 6 additions and 12 deletions
|
|
@ -58,20 +58,12 @@ function(_juce_add_pips)
|
|||
list(APPEND CMAKE_MODULE_PATH "${JUCE_CMAKE_UTILS_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(WebView2 QUIET)
|
||||
find_package(WebView2)
|
||||
|
||||
if(NOT WebView2_FOUND)
|
||||
list(REMOVE_ITEM headers "${CMAKE_CURRENT_SOURCE_DIR}/WebViewPluginDemo.h")
|
||||
|
||||
message(WARNING "The WebViewPluginDemo was not enabled because WebView2 wasn't found"
|
||||
" in the the local NuGet folder"
|
||||
"\n"
|
||||
"To install NuGet and the WebView2 package containing the statically linked library, "
|
||||
"open a PowerShell and issue the following commands"
|
||||
"\n"
|
||||
"> Register-PackageSource -provider NuGet -name nugetRepository -location https://www.nuget.org/api/v2\n"
|
||||
"> Install-Package NuGet.CommandLine -Scope CurrentUser\n"
|
||||
"> Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.1901.177\n")
|
||||
message(WARNING "The WebViewPluginDemo was not enabled because the WebView2 package wasn't found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,10 @@ elseif(NOT WebView2_FIND_QUIETLY)
|
|||
"open a PowerShell and issue the following commands"
|
||||
"\n"
|
||||
"> Register-PackageSource -provider NuGet -name nugetRepository -location https://www.nuget.org/api/v2\n"
|
||||
"> Install-Package NuGet.CommandLine -Scope CurrentUser\n"
|
||||
"> Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.1901.177\n")
|
||||
"> Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.1901.177 -Source nugetRepository\n"
|
||||
"\n"
|
||||
"Alternatively you can use the JUCE_WEBVIEW2_PACKAGE_LOCATION CMake variable to specify the directory "
|
||||
"where this find script is looking for the *Microsoft.Web.WebView2* package directory.")
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(WebView2 DEFAULT_MSG WebView2_include_dir WebView2_library)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue