Skip to content

Commit 321c096

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 4ced2ab commit 321c096

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)