mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 07:51:38 +08:00
applocal-deps applied to MODULE_LIBRARY target too (#2972)
* Fix for issue #2786 * [vcpkg-cmake-toolchain] Only applocal dependencies for shared libraries * applocal-deps applied to MODULE_LIBRARY target too
This commit is contained in:
parent
76f647feb1
commit
ae1ce5aaa7
@ -170,7 +170,7 @@ function(add_library name)
|
|||||||
list(FIND ARGV "ALIAS" ALIAS_IDX)
|
list(FIND ARGV "ALIAS" ALIAS_IDX)
|
||||||
if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
|
if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1)
|
||||||
get_target_property(IS_LIBRARY_SHARED ${name} TYPE)
|
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")
|
if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND (IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY" OR IS_LIBRARY_SHARED STREQUAL "MODULE_LIBRARY"))
|
||||||
add_custom_command(TARGET ${name} POST_BUILD
|
add_custom_command(TARGET ${name} POST_BUILD
|
||||||
COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
|
COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
|
||||||
-targetBinary $<TARGET_FILE:${name}>
|
-targetBinary $<TARGET_FILE:${name}>
|
||||||
|
Loading…
Reference in New Issue
Block a user