aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/vcpkg.cmake15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 257007e45..6384de7d3 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -53,13 +53,14 @@ if(NOT VCPKG_TOOLCHAIN)
if(OVERRIDE_ADD_EXECUTABLE)
function(add_executable name)
_add_executable(${ARGV})
- if(NOT "IMPORTED" IN_LIST ARGV)
- add_custom_command(TARGET ${name} POST_BUILD
- COMMAND powershell -noprofile -executionpolicy UnRestricted -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
- -targetBinary $<TARGET_FILE:${name}>
- -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
- -OutVariable out
- )
+ list(FIND ARGV "IMPORTED" IMPORTED_IDX)
+ if(IMPORTED_IDX EQUAL -1)
+ add_custom_command(TARGET ${name} POST_BUILD
+ COMMAND powershell -noprofile -executionpolicy UnRestricted -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()
endfunction()
endif()