mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 17:41:09 +08:00
[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`.
This commit is contained in:
parent
e76c524f63
commit
9adaafc4f4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user