From 17f16771664a8c9584e20251e8e1b823cc382546 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Mon, 17 Apr 2023 15:27:37 +0100 Subject: [PATCH] HPCC-29401 CPack fails creating windows install Signed-off-by: Gordon Smith --- cmake_modules/commonSetup.cmake | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/cmake_modules/commonSetup.cmake b/cmake_modules/commonSetup.cmake index 36402de511d..ee433fb7763 100644 --- a/cmake_modules/commonSetup.cmake +++ b/cmake_modules/commonSetup.cmake @@ -1063,11 +1063,20 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "") if(ARGV0 STREQUAL "TARGETS") list(INSERT ARGS 2 "RUNTIME_DEPENDENCY_SET") list(INSERT ARGS 3 ${ARGV1}_deps) - install(RUNTIME_DEPENDENCY_SET ${ARGV1}_deps - DESTINATION ${LIB_DIR} - POST_INCLUDE_REGEXES "^${VCPKG_FILES_DIR}\/vcpkg_installed\/.*" - POST_EXCLUDE_REGEXES ".*" - ) + if (WIN32) + install(RUNTIME_DEPENDENCY_SET ${ARGV1}_deps + DESTINATION ${EXEC_DIR} + PRE_EXCLUDE_REGEXES "api-ms-win-.*\.dll" + POST_INCLUDE_REGEXES "^${VCPKG_FILES_DIR}.*" + POST_EXCLUDE_REGEXES ".*" + ) + else() + install(RUNTIME_DEPENDENCY_SET ${ARGV1}_deps + DESTINATION ${LIB_DIR} + POST_INCLUDE_REGEXES "^${VCPKG_FILES_DIR}\/vcpkg_installed\/.*" + POST_EXCLUDE_REGEXES ".*" + ) + endif() endif() endif()