Skip to content

Commit e884bb1

Browse files
committed
Merge pull request #2971 from dennisameling/vcpkg-dlls
cmake(install): include vcpkg dlls
2 parents b08aa30 + f80105f commit e884bb1

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ jobs:
129129
vs-build:
130130
needs: ci-config
131131
if: needs.ci-config.outputs.enabled == 'yes'
132+
timeout-minutes: 15
132133
env:
133134
NO_PERL: 1
134135
GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
@@ -139,6 +140,11 @@ jobs:
139140
steps:
140141
- uses: actions/checkout@v2
141142
- uses: git-for-windows/setup-git-for-windows-sdk@v1
143+
- name: initialize vcpkg
144+
uses: actions/checkout@v2
145+
with:
146+
repository: 'microsoft/vcpkg'
147+
path: 'compat/vcbuild/vcpkg'
142148
- name: download vcpkg artifacts
143149
shell: powershell
144150
run: |

contrib/buildsystems/CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ if(WIN32)
5858

5959
# In the vcpkg edition, we need this to be able to link to libcurl
6060
set(CURL_NO_CURL_CMAKE ON)
61+
62+
# Copy the necessary vcpkg DLLs (like iconv) to the install dir
63+
set(X_VCPKG_APPLOCAL_DEPS_INSTALL ON)
64+
set(CMAKE_TOOLCHAIN_FILE ${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file")
6165
endif()
6266

6367
find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin")
@@ -813,15 +817,19 @@ list(TRANSFORM git_shell_scripts PREPEND "${CMAKE_BINARY_DIR}/")
813817
list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
814818

815819
#install
816-
install(TARGETS git git-shell
820+
foreach(program ${PROGRAMS_BUILT})
821+
if(program STREQUAL "git" OR program STREQUAL "git-shell")
822+
install(TARGETS ${program}
817823
RUNTIME DESTINATION bin)
824+
else()
825+
install(TARGETS ${program}
826+
RUNTIME DESTINATION libexec/git-core)
827+
endif()
828+
endforeach()
829+
818830
install(PROGRAMS ${CMAKE_BINARY_DIR}/git-cvsserver
819831
DESTINATION bin)
820832

821-
list(REMOVE_ITEM PROGRAMS_BUILT git git-shell)
822-
install(TARGETS ${PROGRAMS_BUILT}
823-
RUNTIME DESTINATION libexec/git-core)
824-
825833
set(bin_links
826834
git-receive-pack git-upload-archive git-upload-pack)
827835

0 commit comments

Comments
 (0)