Skip to content

Commit 2e9fea1

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 bebcf1e commit 2e9fea1

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
@@ -749,6 +749,7 @@ if(WIN32)
749749
endif()
750750

751751
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
752+
list(APPEND PROGRAMS_BUILT headless-git)
752753
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
753754
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
754755
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
@@ -928,7 +929,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
928929

929930
#install
930931
foreach(program ${PROGRAMS_BUILT})
931-
if(program MATCHES "^(git|git-shell|scalar)$")
932+
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
932933
install(TARGETS ${program}
933934
RUNTIME DESTINATION bin)
934935
else()

0 commit comments

Comments
 (0)