summaryrefslogtreecommitdiffstats
path: root/cmake/SelectXdiff.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:08 +0000
commit29b5ab554790bb57337a3b6ab9dcd963cf69d22e (patch)
treebe1456d2bc6c1fb078695fad7bc8f6b212062d3c /cmake/SelectXdiff.cmake
parentInitial commit. (diff)
downloadlibgit2-upstream/1.7.2+ds.tar.xz
libgit2-upstream/1.7.2+ds.zip
Adding upstream version 1.7.2+ds.upstream/1.7.2+ds
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--cmake/SelectXdiff.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/SelectXdiff.cmake b/cmake/SelectXdiff.cmake
new file mode 100644
index 0000000..9ab9f3f
--- /dev/null
+++ b/cmake/SelectXdiff.cmake
@@ -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()