Skip to content

Commit c189765

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 f5b3cc0 + 1a7b308 commit c189765

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/buildsystems/CMakeLists.txt

+2-1
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")
@@ -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)