aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBruce Jones <bruce.david.jones@gmail.com>2018-02-13 19:13:27 -0500
committerRobert Schumacher <roschuma@microsoft.com>2018-02-13 16:13:27 -0800
commit78b1396b88f93f74f9a007599e5998026445f14f (patch)
tree53762e4b3f84a446ea00f914bb00d0a59665749f /scripts
parent89bd6330dc28a5171a043910922534966bc379b5 (diff)
downloadvcpkg-78b1396b88f93f74f9a007599e5998026445f14f.tar.gz
vcpkg-78b1396b88f93f74f9a007599e5998026445f14f.zip
Copy local dependencies for library targets (#2787)
* Fix for issue #2786 * [vcpkg-cmake-toolchain] Only applocal dependencies for shared libraries
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 0cb311555..ceb43940b 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -163,6 +163,15 @@ function(add_library name)
list(FIND ARGV "INTERFACE" INTERFACE_IDX)
list(FIND ARGV "ALIAS" ALIAS_IDX)
if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
+ get_target_property(IS_LIBRARY_SHARED ${name} TYPE)
+ if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY")
+ add_custom_command(TARGET ${name} POST_BUILD
+ COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
+ -targetBinary $<TARGET_FILE:${name}>
+ -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
+ -OutVariable out
+ )
+ endif()
set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props)
set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
endif()