Skip to content

Commit 187a021

Browse files
Berrysoftdscho
authored andcommitted
cmake: install headless-git.
headless-git is a git executable without opening a console window. It is useful when other GUI executables want to call git. We should install it together with git on Windows. Signed-off-by: Yuyi Wang <[email protected]>
1 parent f18bc14 commit 187a021

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)