Merge branch 'js/ps-build-cmake-fixup'
Build fixes for Windows. * js/ps-build-cmake-fixup: cmake/vcxproj: stop special-casing `remote-ext` cmake: put the Perl modules into the correct location again cmake: use the correct file name for the Perl header cmake(mergetools): better support for out-of-tree builds cmake: better support for out-of-tree builds follow-up
This commit is contained in:
@ -867,7 +867,7 @@ list(TRANSFORM perl_modules REPLACE "${CMAKE_SOURCE_DIR}/" "")
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/perl/header_templates/fixed_prefix.template.pl perl_header )
|
||||
string(REPLACE "@PATHSEP@" ":" perl_header "${perl_header}")
|
||||
string(REPLACE "@INSTLIBDIR@" "${INSTLIBDIR}" perl_header "${perl_header}")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/PERL-HEADER ${perl_header})
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/GIT-PERL-HEADER ${perl_header})
|
||||
|
||||
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/GIT-VERSION-FILE"
|
||||
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/GIT-VERSION-GEN"
|
||||
@ -882,13 +882,17 @@ foreach(script ${git_perl_scripts} ${perl_modules})
|
||||
string(REPLACE ".perl" "" perl_gen_path "${script}")
|
||||
|
||||
get_filename_component(perl_gen_dir "${perl_gen_path}" DIRECTORY)
|
||||
if(script MATCHES "\.pm$")
|
||||
string(REGEX REPLACE "^perl" "perl/build/lib" perl_gen_dir "${perl_gen_dir}")
|
||||
string(REGEX REPLACE "^perl" "perl/build/lib" perl_gen_path "${perl_gen_path}")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${perl_gen_dir}")
|
||||
|
||||
add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/${perl_gen_path}"
|
||||
COMMAND "${SH_EXE}" "${CMAKE_SOURCE_DIR}/generate-perl.sh"
|
||||
"${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS"
|
||||
"${CMAKE_BINARY_DIR}/GIT-VERSION-FILE"
|
||||
"${CMAKE_BINARY_DIR}/PERL-HEADER"
|
||||
"${CMAKE_BINARY_DIR}/GIT-PERL-HEADER"
|
||||
"${CMAKE_SOURCE_DIR}/${script}"
|
||||
"${CMAKE_BINARY_DIR}/${perl_gen_path}"
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/generate-perl.sh"
|
||||
@ -1078,7 +1082,7 @@ endif()
|
||||
|
||||
#wrapper scripts
|
||||
set(wrapper_scripts
|
||||
git git-upload-pack git-receive-pack git-upload-archive git-shell git-remote-ext scalar)
|
||||
git git-upload-pack git-receive-pack git-upload-archive git-shell scalar)
|
||||
|
||||
set(wrapper_test_scripts
|
||||
test-fake-ssh test-tool)
|
||||
@ -1087,6 +1091,7 @@ set(wrapper_test_scripts
|
||||
foreach(script ${wrapper_scripts})
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME)
|
||||
string(REPLACE "@BUILD_DIR@" "${CMAKE_BINARY_DIR}" content "${content}")
|
||||
string(REPLACE "@TEMPLATE_DIR@" "'${CMAKE_BINARY_DIR}/templates/blt'" content "${content}")
|
||||
string(REPLACE "@PROG@" "${CMAKE_BINARY_DIR}/${script}${EXE_EXTENSION}" content "${content}")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin-wrappers/${script} ${content})
|
||||
endforeach()
|
||||
@ -1094,12 +1099,14 @@ endforeach()
|
||||
foreach(script ${wrapper_test_scripts})
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME)
|
||||
string(REPLACE "@BUILD_DIR@" "${CMAKE_BINARY_DIR}" content "${content}")
|
||||
string(REPLACE "@TEMPLATE_DIR@" "'${CMAKE_BINARY_DIR}/templates/blt'" content "${content}")
|
||||
string(REPLACE "@PROG@" "${CMAKE_BINARY_DIR}/t/helper/${script}${EXE_EXTENSION}" content "${content}")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/bin-wrappers/${script} ${content})
|
||||
endforeach()
|
||||
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/bin-wrappers/wrap-for-bin.sh content NEWLINE_CONSUME)
|
||||
string(REPLACE "@BUILD_DIR@" "${CMAKE_BINARY_DIR}" content "${content}")
|
||||
string(REPLACE "@TEMPLATE_DIR@" "'${CMAKE_BINARY_DIR}/templates/blt'" content "${content}")
|
||||
string(REPLACE "@GIT_TEXTDOMAINDIR@" "${CMAKE_BINARY_DIR}/po/build/locale" content "${content}")
|
||||
string(REPLACE "@GITPERLLIB@" "${CMAKE_BINARY_DIR}/perl/build/lib" content "${content}")
|
||||
string(REPLACE "@MERGE_TOOLS_DIR@" "${CMAKE_SOURCE_DIR}/mergetools" content "${content}")
|
||||
@ -1192,7 +1199,7 @@ string(REPLACE "@GIT_TEST_TEXTDOMAINDIR@" "'${CMAKE_BINARY_DIR}/po/build/locale'
|
||||
string(REPLACE "@GIT_TEST_POPATH@" "'${CMAKE_BINARY_DIR}/po'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@GIT_TEST_TEMPLATE_DIR@" "'${CMAKE_BINARY_DIR}/templates/blt'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@GIT_TEST_GITPERLLIB@" "'${CMAKE_BINARY_DIR}/perl/build/lib'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@GIT_TEST_MERGE_TOOLS_DIR@" "'${RUNTIME_PREFIX}'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@GIT_TEST_MERGE_TOOLS_DIR@" "'${CMAKE_BINARY_DIR}/mergetools'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@RUNTIME_PREFIX@" "'${RUNTIME_PREFIX}'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@GITWEBDIR@" "'${GITWEBDIR}'" git_build_options "${git_build_options}")
|
||||
string(REPLACE "@USE_GETTEXT_SCHEME@" "" git_build_options "${git_build_options}")
|
||||
|
Reference in New Issue
Block a user