mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-15 09:08:42 -05:00
cmake: install headless-git. (#4338)
Even if CMake is not the canonical way to build Git for Windows, but CMake support merely exists in Git to support building Git for Windows using Visual Studio, we should include `headless-git` in such a scenario when installing the binaries to a given location.
This commit is contained in:
@@ -740,6 +740,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")
|
||||
@@ -919,7 +920,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()
|
||||
|
||||
Reference in New Issue
Block a user