xdiff: move xdiff to 'deps'

xdiff is a dependency (from git core) and more properly belongs in the
'deps' directory. Move it there, and add a stub for cmake to resolve
xdiff from the system location in the future. (At present, bundled xdiff
remains hardcoded.)
This commit is contained in:
Edward Thomson
2023-02-15 10:26:50 +00:00
committed by Edward Thomson
parent af12fc11c5
commit 462dbe21d0
24 changed files with 41 additions and 23 deletions

9
cmake/SelectXdiff.cmake Normal file
View File

@@ -0,0 +1,9 @@
# Optional external dependency: xdiff
if(USE_XDIFF STREQUAL "system")
message(FATAL_ERROR "external/system xdiff is not yet supported")
else()
add_subdirectory("${PROJECT_SOURCE_DIR}/deps/xdiff" "${PROJECT_BINARY_DIR}/deps/xdiff")
list(APPEND LIBGIT2_DEPENDENCY_INCLUDES "${PROJECT_SOURCE_DIR}/deps/xdiff")
list(APPEND LIBGIT2_DEPENDENCY_OBJECTS "$<TARGET_OBJECTS:xdiff>")
add_feature_info(xdiff ON "xdiff support (bundled)")
endif()