mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
cmake: unify version check for target include directories
There are two locations where we check whether CMake supports `TARGET_INCLUDE_DIRECTORIES`. While the first one uses `VERSION_LESS 2.8.12`, the second one uses `VERSION_GREATER 2.8.11`, which are obviously equivalent to each other. It'd still be easier to grep for specific CMake versions being required for some features if both used the same conditional mentioning the actual target version required. So this commit refactors these conditions to make them equal.
This commit is contained in:
@@ -37,7 +37,9 @@ ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
|
||||
|
||||
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
IF (${CMAKE_VERSION} VERSION_GREATER 2.8.11)
|
||||
IF (${CMAKE_VERSION} VERSION_LESS 2.8.12)
|
||||
# Already handled by a global INCLUDE_DIRECTORY()
|
||||
ELSE()
|
||||
TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include)
|
||||
ENDIF()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user