Skip to content

Commit 5c9c80d

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
cmake: install headless-git. (#4338)
Even if CMake is not the canonical way to build Git for Windows, but CMake support merely exists in Git to support building Git for Windows using Visual Studio, we should include `headless-git` in such a scenario when installing the binaries to a given location.
2 parents 7e0bb60 + f28d062 commit 5c9c80d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ if(WIN32)
766766
endif()
767767

768768
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
769+
list(APPEND PROGRAMS_BUILT headless-git)
769770
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
770771
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
771772
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
@@ -945,7 +946,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
945946

946947
#install
947948
foreach(program ${PROGRAMS_BUILT})
948-
if(program MATCHES "^(git|git-shell|scalar)$")
949+
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
949950
install(TARGETS ${program}
950951
RUNTIME DESTINATION bin)
951952
else()

0 commit comments

Comments
 (0)