Skip to content

Commit 00ebf09

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 28a63ad + f48cfd4 commit 00ebf09

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
@@ -740,6 +740,7 @@ if(WIN32)
740740
endif()
741741

742742
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
743+
list(APPEND PROGRAMS_BUILT headless-git)
743744
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
744745
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
745746
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
@@ -919,7 +920,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
919920

920921
#install
921922
foreach(program ${PROGRAMS_BUILT})
922-
if(program MATCHES "^(git|git-shell|scalar)$")
923+
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
923924
install(TARGETS ${program}
924925
RUNTIME DESTINATION bin)
925926
else()

0 commit comments

Comments
 (0)