From 9adaafc4f46250ee4b88a91de6db74a476e6fdc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Wed, 3 Feb 2021 21:51:28 +0100 Subject: [vcpkg] fix X_VCPKG_APPLOCAL_DEPS_INSTALL (#15960) * [vcpkg] fix X_VCPKG_APPLOCAL_DEPS_INSTALL * [vcpkg] fix x_vcpkg_install_local_dependencies Fixed `x_vcpkg_install_local_dependencies` always assuming a relative `DESTINATION`. --- scripts/buildsystems/vcpkg.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index f4fa8a64f..7c9da5e25 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -526,6 +526,9 @@ function(x_vcpkg_install_local_dependencies) if(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") cmake_parse_arguments(PARSE_ARGV 0 __VCPKG_APPINSTALL "" "DESTINATION" "TARGETS") _vcpkg_set_powershell_path() + if(NOT IS_ABSOLUTE ${__VCPKG_APPINSTALL_DESTINATION}) + set(__VCPKG_APPINSTALL_DESTINATION "\${CMAKE_INSTALL_PREFIX}/${__VCPKG_APPINSTALL_DESTINATION}") + endif() foreach(TARGET IN LISTS __VCPKG_APPINSTALL_TARGETS) get_target_property(TARGETTYPE ${TARGET} TYPE) if(NOT TARGETTYPE STREQUAL "INTERFACE_LIBRARY") @@ -535,7 +538,7 @@ function(x_vcpkg_install_local_dependencies) 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}/$\" + -targetBinary \"${__VCPKG_APPINSTALL_DESTINATION}/$\" -installedDir \"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin\" -OutVariable out)") endif() @@ -553,7 +556,7 @@ if(X_VCPKG_APPLOCAL_DEPS_INSTALL) set(PARSED_TARGETS "") # Destination - [RUNTIME] DESTINATION argument overrides this - set(DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + set(DESTINATION "bin") # Parse arguments given to the install function to find targets and (runtime) destination set(MODIFIER "") # Modifier for the command in the argument -- cgit v1.2.3