Skip to content

Commit d7199b7

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 d5babbd + 9f71158 commit d7199b7

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
@@ -775,6 +775,7 @@ if(WIN32)
775775
endif()
776776

777777
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
778+
list(APPEND PROGRAMS_BUILT headless-git)
778779
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
779780
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
780781
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
@@ -954,7 +955,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
954955

955956
#install
956957
foreach(program ${PROGRAMS_BUILT})
957-
if(program MATCHES "^(git|git-shell|scalar)$")
958+
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
958959
install(TARGETS ${program}
959960
RUNTIME DESTINATION bin)
960961
else()

0 commit comments

Comments
 (0)