@@ -58,6 +58,10 @@ if(WIN32)
58
58
59
59
# In the vcpkg edition, we need this to be able to link to libcurl
60
60
set (CURL_NO_CURL_CMAKE ON )
61
+
62
+ # Copy the necessary vcpkg DLLs (like iconv) to the install dir
63
+ set (X_VCPKG_APPLOCAL_DEPS_INSTALL ON )
64
+ set (CMAKE_TOOLCHAIN_FILE ${VCPKG_DIR} /scripts/buildsystems/vcpkg.cmake CACHE STRING "Vcpkg toolchain file" )
61
65
endif ()
62
66
63
67
find_program (SH_EXE sh PATHS "C:/Program Files/Git/bin" )
@@ -691,13 +695,17 @@ endif()
691
695
692
696
parse_makefile_for_executables(git_builtin_extra "BUILT_INS" )
693
697
698
+ option (SKIP_DASHED_BUILT_INS "Skip hardlinking the dashed versions of the built-ins" )
699
+
694
700
#Creating hardlinks
701
+ if (NOT SKIP_DASHED_BUILT_INS)
695
702
foreach (s ${git_SOURCES} ${git_builtin_extra} )
696
703
string (REPLACE "${CMAKE_SOURCE_DIR} /builtin/" "" s ${s} )
697
704
string (REPLACE ".c" "" s ${s} )
698
705
file (APPEND ${CMAKE_BINARY_DIR} /CreateLinks.cmake "file(CREATE_LINK git${EXE_EXTENSION} git-${s}${EXE_EXTENSION} )\n " )
699
706
list (APPEND git_links ${CMAKE_BINARY_DIR} /git-${s}${EXE_EXTENSION} )
700
707
endforeach ()
708
+ endif ()
701
709
702
710
if (CURL_FOUND)
703
711
set (remote_exes
@@ -813,15 +821,19 @@ list(TRANSFORM git_shell_scripts PREPEND "${CMAKE_BINARY_DIR}/")
813
821
list (TRANSFORM git_perl_scripts PREPEND "${CMAKE_BINARY_DIR} /" )
814
822
815
823
#install
816
- install (TARGETS git git-shell
824
+ foreach (program ${PROGRAMS_BUILT} )
825
+ if (program STREQUAL "git" OR program STREQUAL "git-shell" )
826
+ install (TARGETS ${program}
817
827
RUNTIME DESTINATION bin)
828
+ else ()
829
+ install (TARGETS ${program}
830
+ RUNTIME DESTINATION libexec/git-core)
831
+ endif ()
832
+ endforeach ()
833
+
818
834
install (PROGRAMS ${CMAKE_BINARY_DIR} /git-cvsserver
819
835
DESTINATION bin)
820
836
821
- list (REMOVE_ITEM PROGRAMS_BUILT git git-shell)
822
- install (TARGETS ${PROGRAMS_BUILT}
823
- RUNTIME DESTINATION libexec/git-core)
824
-
825
837
set (bin_links
826
838
git-receive-pack git-upload-archive git-upload-pack)
827
839
@@ -834,12 +846,12 @@ install(CODE "file(CREATE_LINK ${CMAKE_INSTALL_PREFIX}/bin/git-shell${EXE_EXTENS
834
846
835
847
foreach (b ${git_links} )
836
848
string (REPLACE "${CMAKE_BINARY_DIR} " "" b ${b} )
837
- install (CODE "file(CREATE_LINK ${CMAKE_INSTALL_PREFIX} /bin/git${EXE_EXTENSION} ${CMAKE_INSTALL_PREFIX} /libexec/git-core/${b}${EXE_EXTENSION} )" )
849
+ install (CODE "file(CREATE_LINK ${CMAKE_INSTALL_PREFIX} /bin/git${EXE_EXTENSION} ${CMAKE_INSTALL_PREFIX} /libexec/git-core/${b} )" )
838
850
endforeach ()
839
851
840
852
foreach (b ${git_http_links} )
841
853
string (REPLACE "${CMAKE_BINARY_DIR} " "" b ${b} )
842
- install (CODE "file(CREATE_LINK ${CMAKE_INSTALL_PREFIX} /libexec/git-core/git-remote-http${EXE_EXTENSION} ${CMAKE_INSTALL_PREFIX} /libexec/git-core/${b}${EXE_EXTENSION} )" )
854
+ install (CODE "file(CREATE_LINK ${CMAKE_INSTALL_PREFIX} /libexec/git-core/git-remote-http${EXE_EXTENSION} ${CMAKE_INSTALL_PREFIX} /libexec/git-core/${b} )" )
843
855
endforeach ()
844
856
845
857
install (PROGRAMS ${git_shell_scripts} ${git_perl_scripts} ${CMAKE_BINARY_DIR} /git-p4
0 commit comments