mirror of
https://github.com/git-for-windows/git.git
synced 2026-02-04 12:24:55 -06:00
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 <Strawberry_Str@hotmail.com>
This commit is contained in:
parent
3d7685d361
commit
8000293e39
@ -736,6 +736,7 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
|
||||
list(APPEND PROGRAMS_BUILT headless-git)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
@ -936,7 +937,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
|
||||
|
||||
#install
|
||||
foreach(program ${PROGRAMS_BUILT})
|
||||
if(program MATCHES "^(git|git-shell|scalar)$")
|
||||
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
|
||||
install(TARGETS ${program}
|
||||
RUNTIME DESTINATION bin)
|
||||
else()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user