Skip to content

Commit

Permalink
feat: automatically install runtimes for vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
FeignClaims committed Sep 11, 2024
1 parent 8cc47aa commit 392bd6b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/PackageProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,22 @@ function(package_project)
${CONAN_RUNTIME_LIB_DIRS}
)
endif()
if(VCPKG_INSTALLED_DIR)
install(RUNTIME_DEPENDENCY_SET project_deps
PRE_EXCLUDE_REGEXES
[[api-ms-win-.*]]
[[ext-ms-.*]]
[[kernel32\.dll]]
[[(libc|libgcc_s|libm|libstdc\+\+|libc\+\+)\..*]]
POST_EXCLUDE_REGEXES
[[.*/system32/.*\.dll]]
[[^/lib.*]]
[[^/usr/lib.*]]
DIRECTORIES
"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/bin"
"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$<CONFIG:Debug>:/debug>/lib"
)
endif()

# download ForwardArguments
FetchContent_Declare(
Expand Down

0 comments on commit 392bd6b

Please sign in to comment.