mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-28 02:23:48 -05: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:
committed by
Johannes Schindelin
parent
e48e3608c0
commit
e657e64932
@@ -740,6 +740,7 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(headless-git ${CMAKE_SOURCE_DIR}/compat/win32/headless.c)
|
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")
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
|
target_link_options(headless-git PUBLIC -municode -Wl,-subsystem,windows)
|
||||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||||
@@ -919,7 +920,7 @@ list(TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR}/")
|
|||||||
|
|
||||||
#install
|
#install
|
||||||
foreach(program ${PROGRAMS_BUILT})
|
foreach(program ${PROGRAMS_BUILT})
|
||||||
if(program MATCHES "^(git|git-shell|scalar)$")
|
if(program MATCHES "^(git|git-shell|headless-git|scalar)$")
|
||||||
install(TARGETS ${program}
|
install(TARGETS ${program}
|
||||||
RUNTIME DESTINATION bin)
|
RUNTIME DESTINATION bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user