aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid Hrdlička <dhrdlicka@users.noreply.github.com>2021-02-03 21:51:28 +0100
committerGitHub <noreply@github.com>2021-02-03 12:51:28 -0800
commit9adaafc4f46250ee4b88a91de6db74a476e6fdc3 (patch)
treef667321a9775376fe6e9620ef81d37587135074b /scripts
parente76c524f630f597af04fcbb8fc177c5fd8e281a4 (diff)
downloadvcpkg-9adaafc4f46250ee4b88a91de6db74a476e6fdc3.tar.gz
vcpkg-9adaafc4f46250ee4b88a91de6db74a476e6fdc3.zip
[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`.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake7
1 files changed, 5 insertions, 2 deletions
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}/$<TARGET_FILE_NAME:${TARGET}>\"
+ -targetBinary \"${__VCPKG_APPINSTALL_DESTINATION}/$<TARGET_FILE_NAME:${TARGET}>\"
-installedDir \"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/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