Files
libgit2/cmake/SelectXdiff.cmake
Edward Thomson 4546929e00 cmake: case insensitive options
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.
2025-01-02 12:36:46 +00:00

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()