diff options
| author | Be <be@mixxx.org> | 2021-01-28 13:43:14 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-28 13:43:14 -0800 |
| commit | 31608174fa4ab844583a01c12f1fd4033a079846 (patch) | |
| tree | 445ed213f49a9bc5b1c037820ca8b0e0eae08dd6 /scripts | |
| parent | 3c466eb80c705ec42dbb278351e2ef2f5253b622 (diff) | |
| download | vcpkg-31608174fa4ab844583a01c12f1fd4033a079846.tar.gz vcpkg-31608174fa4ab844583a01c12f1fd4033a079846.zip | |
set CMake policy CMP0087 for X_VCPKG_APPLOCAL_DEPS_INSTALL (#15874)
Without this, X_VCPKG_APPLOCAL_DEPS_INSTALL does not work and
CMake prints this warning at the configure step:
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0087 is not set: Install CODE|SCRIPT allow the use of generator
expressions. Run "cmake --help-policy CMP0087" 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.
https://cmake.org/cmake/help/latest/policy/CMP0087.html
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/vcpkg.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 296920939..f4fa8a64f 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -529,6 +529,10 @@ function(x_vcpkg_install_local_dependencies) foreach(TARGET IN LISTS __VCPKG_APPINSTALL_TARGETS) get_target_property(TARGETTYPE ${TARGET} TYPE) if(NOT TARGETTYPE STREQUAL "INTERFACE_LIBRARY") + # Install CODE|SCRIPT allow the use of generator expressions + if(POLICY CMP0087) + cmake_policy(SET CMP0087 NEW) + endif() install(CODE "message(\"-- Installing app dependencies for ${TARGET}...\") execute_process(COMMAND \"${_VCPKG_POWERSHELL_PATH}\" -noprofile -executionpolicy Bypass -file \"${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1\" -targetBinary \"\${CMAKE_INSTALL_PREFIX}/${__VCPKG_APPINSTALL_DESTINATION}/$<TARGET_FILE_NAME:${TARGET}>\" |
