Skip to content

Commit 9e0c4be

Browse files
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 d7809a6 + 24db72b commit 9e0c4be

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
@@ -745,6 +745,7 @@ if(WIN32)
745745
endif()
746746

747747
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
748+
list(APPEND PROGRAMS_BUILT headless-git)
748749
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
749750
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
750751
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
@@ -941,7 +942,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
941942

942943
#install
943944
foreach(program ${PROGRAMS_BUILT})
944-
if(program MATCHES "^(git|git-shell|scalar)$")
945+
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
945946
install(TARGETS ${program}
946947
RUNTIME DESTINATION bin)
947948
else()

0 commit comments

Comments
 (0)