Unverified Commit 1f9b4970 by Patrick Steinhardt Committed by GitHub

Merge pull request #5260 from pks-t/pks/cmake3

cmake: update minimum CMake version to v3.5.1
parents 6716e2f3 ebabb88f
......@@ -12,7 +12,7 @@
# > cmake --build . --target install
PROJECT(libgit2 C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
CMAKE_POLICY(SET CMP0015 NEW)
IF(POLICY CMP0051)
CMAKE_POLICY(SET CMP0051 NEW)
......@@ -335,10 +335,5 @@ IF(BUILD_FUZZERS)
ADD_SUBDIRECTORY(fuzzers)
ENDIF()
IF(CMAKE_VERSION VERSION_GREATER 3)
FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
ELSE()
PRINT_ENABLED_FEATURES()
PRINT_DISABLED_FEATURES()
ENDIF()
FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
......@@ -333,16 +333,8 @@ SET_TARGET_PROPERTIES(git2internal PROPERTIES C_STANDARD 90)
IDE_SPLIT_SOURCES(git2internal)
LIST(APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:git2internal>)
IF (${CMAKE_VERSION} VERSION_LESS 2.8.12)
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
INCLUDE_DIRECTORIES(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})
ELSE()
TARGET_INCLUDE_DIRECTORIES(git2internal
PRIVATE ${LIBGIT2_INCLUDES}
PUBLIC ${libgit2_SOURCE_DIR}/include)
TARGET_INCLUDE_DIRECTORIES(git2internal
SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
ENDIF()
TARGET_INCLUDE_DIRECTORIES(git2internal PRIVATE ${LIBGIT2_INCLUDES} PUBLIC ${libgit2_SOURCE_DIR}/include)
TARGET_INCLUDE_DIRECTORIES(git2internal SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES})
SET(LIBGIT2_OBJECTS ${LIBGIT2_OBJECTS} PARENT_SCOPE)
SET(LIBGIT2_INCLUDES ${LIBGIT2_INCLUDES} PARENT_SCOPE)
......
......@@ -42,12 +42,7 @@ ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES C_STANDARD 90)
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
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()
TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include)
TARGET_LINK_LIBRARIES(libgit2_clar ${LIBGIT2_LIBS})
IDE_SPLIT_SOURCES(libgit2_clar)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment