flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

[Windows] CMake warning

Open Nico04 opened this issue 4 months ago • 4 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Current Behavior

It's just a warning, but still, it should be adressed.

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
CMake Warning (dev) at flutter/ephemeral/.plugin_symlinks/flutter_inappwebview_windows/windows/CMakeLists.txt:31 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

C:\Users\{MyProject}\windows\flutter\ephemeral\.plugin_symlinks\flutter_inappwebview_windows\windows\types\web_resource_response.cpp(54,28): warning C4244: 'argument': conversion from '__int64' to 'int', possible loss of data [C:\Users\{MyProject}\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_plugin.vcxproj]
C:\Users\{MyProject}\build\windows\x64\packages\Microsoft.Web.WebView2\build\native\include\WebView2EnvironmentOptions.h(194,3): warning C4458: declaration of 'value' hides class member [C:\Users\{MyProject}\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_plugin.vcxproj]
C:\Users\{MyProject}\build\windows\x64\packages\Microsoft.Web.WebView2\build\native\include\WebView2EnvironmentOptions.h(193,3): warning C4458: declaration of 'value' hides class member [C:\Users\{MyProject}\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_plugin.vcxproj]
C:\Users\{MyProject}\build\windows\x64\packages\Microsoft.Web.WebView2\build\native\include\WebView2EnvironmentOptions.h(194,3): warning C4458: declaration of 'value' hides class member [C:\Users\{MyProject}\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_plugin.vcxproj]
C:\Users\{MyProject}\build\windows\x64\packages\Microsoft.Web.WebView2\build\native\include\WebView2EnvironmentOptions.h(193,3): warning C4458: declaration of 'value' hides class member [C:\Users\{MyProject}\build\windows\x64\plugins\flutter_inappwebview_windows\flutter_inappwebview_windows_plugin.vcxproj]

Expected Behavior

No warnings

Steps with code example to reproduce

Just build a Windows app

Stacktrace/Logs

See above

Flutter version

Flutter 3.32.8

Operating System, Device-specific and/or Tool

Windows 11

Plugin version

6.1.5

Additional information

No response

Self grab

  • [ ] I'm ready to work on this issue!

Nico04 avatar Jul 29 '25 13:07 Nico04

Got this too!

`CMake Warning (dev) at flutter/ephemeral/.plugin_symlinks/webview_windows/windows/CMakeLists.txt:34 (add_custom_command): The following keywords are not supported when using add_custom_command(TARGET): DEPENDS.

Policy CMP0175 is not set: add_custom_command() rejects invalid arguments. Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.`

cberry35 avatar Aug 07 '25 18:08 cberry35

Warning started showing after updating Visual Studio

NikitaPnch avatar Sep 03 '25 15:09 NikitaPnch

+1 updated visual studio to latest release and also got this.

CMake Warning (dev) at flutter/ephemeral/.plugin_symlinks/flutter_inappwebview_windows/windows/CMakeLists.txt:31 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

stan-at-work avatar Oct 28 '25 08:10 stan-at-work

any update?

devchenli avatar Nov 01 '25 16:11 devchenli