Skip to content

Commit eb02398

Browse files
dennisamelingdscho
authored andcommitted
cmake(install): include vcpkg dlls
Our CMake configuration generates not only build definitions, but also install definitions: After building Git using `msbuild git.sln`, the built artifacts can be installed via `msbuild INSTALL.vcxproj`. To specify _where_ the files should be installed, the `-DCMAKE_INSTALL_PREFIX=<path>` option can be used when running CMake. However, this process would really only install the files that were just built. On Windows, we need more than that: We also need the `.dll` files of the dependencies (such as libcurl). The `vcpkg` ecosystem, which we use to obtain those dependencies, can be asked to install said `.dll` files really easily, so let's do that. Signed-off-by: Dennis Ameling <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 543fd0f commit eb02398

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 4 additions & 0 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")

0 commit comments

Comments
 (0)