CMake Warning (dev) at flutter/ephemeral/.plugin_symlinks/flutter_tts/windows/CMakeLists.txt:12 (exec_program):
PS D:\flutter_projects\yida> flutter build windows --release
CMake Warning (dev) at flutter/ephemeral/.plugin_symlinks/flutter_tts/windows/CMakeLists.txt:12 (exec_program):
Policy CMP0153 is not set: The exec_program command should not be called.
Run "cmake --help-policy CMP0153" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Use execute_process() instead.
This warning is for project developers. Use -Wno-dev to suppress it.
flutter_tts: ^4.2.0
Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 17025dd882 (5 days ago) • 2024-12-17 03:23:09 +0900
Engine • revision cb4b5fff73
Tools • Dart 3.6.0 • DevTools 2.40.2
↓
CMake Warning (dev) at flutter/ephemeral/.plugin_symlinks/flutter_tts/windows/CMakeLists.txt:12 (exec_program):
Policy CMP0153 is not set: The exec_program command should not be called.
Run "cmake --help-policy CMP0153" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Use execute_process() instead.
This warning is for project developers. Use -Wno-dev to suppress it.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: ��D:\flutter_projects\yida\build\windows\x64\CMakeFiles\64773d2939fedebfc4887432e6d8d2bd\super_native_extensions.dll.rule;D:\flutter_projects\
yida\build\windows\x64\CMakeFiles\ce6b56730a16212f8926b426e7a8ff16\super_native_extensions_plugin_cargokit.rule;D:\flutter_projects\yida\windows\flutter\ephemeral\.plugin_symlinks\super_native_extensions\windows\CMakeLists.txt�����Զ����������˳�������Ϊ -1�� [D:\flutter_projects\yida\build\windows\x64\plugins\super_native_extensions\super_native_extensions_plugin_cargokit.vcxproj]
same problem
get your project/windows/flutter/ephemeral/.plugin_symlinks/flutter_tts/windows/CMakeLists.txt and make some change at line 12 like this:
--delete-- exec_program(${NUGET_EXE} ARGS install "Microsoft.Windows.CppWinRT" -Version 2.0.210503.1 -ExcludeVersion -OutputDirectory ${CMAKE_BINARY_DIR}/packages) --delete--
--add--
execute_process(
COMMAND ${NUGET_EXE} install "Microsoft.Windows.CppWinRT" -Version 2.0.210503.1 -ExcludeVersion -OutputDirectory "${CMAKE_BINARY_DIR}/packages"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} # 可选:指定工作目录
RESULT_VARIABLE NUGET_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
--add--
it‘s works for me!
get your project/windows/flutter/ephemeral/.plugin_symlinks/flutter_tts/windows/CMakeLists.txt and make some change at line 12 like this:
--delete-- exec_program(${NUGET_EXE} ARGS install "Microsoft.Windows.CppWinRT" -Version 2.0.210503.1 -ExcludeVersion -OutputDirectory ${CMAKE_BINARY_DIR}/packages) --delete--
--add-- execute_process( COMMAND ${NUGET_EXE} install "Microsoft.Windows.CppWinRT" -Version 2.0.210503.1 -ExcludeVersion -OutputDirectory "${CMAKE_BINARY_DIR}/packages" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} # 可选:指定工作目录 RESULT_VARIABLE NUGET_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) --add-- it‘s works for me!
Thank you, this is okay