mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 11:06:32 +00:00
It's hard to remember whether it's `-DUSE_HTTPS=mbedTLS` or `-DUSE_HTTPS=mbedtls`. Even worse for things like `builtin` which we may have been inconsistent about. Allow for case insensitive options.
17 lines
623 B
CMake
17 lines
623 B
CMake
# Optional external dependency: xdiff
|
|
|
|
include(SanitizeInput)
|
|
|
|
sanitizeinput(USE_XDIFF)
|
|
|
|
if(USE_XDIFF STREQUAL "system")
|
|
message(FATAL_ERROR "external/system xdiff is not yet supported")
|
|
elseif(USE_XDIFF STREQUAL "builtin" OR USE_XDIFF STREQUAL "")
|
|
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 "using bundled provider")
|
|
else()
|
|
message(FATAL_ERROR "asked for unknown Xdiff backend: ${USE_XDIFF}")
|
|
endif()
|