summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-10-10 09:25:32 +0200
committerPatrick Steinhardt <ps@pks.im>2019-10-10 09:42:07 +0200
commitebabb88f24cc9f3c1c02cc79cb98d7dc5605fcaa (patch)
tree40c2040515facc3c84b2eef98e0c917b403492e3 /src/CMakeLists.txt
parentf04a58b00c1a350e2cd90bddcdaa7865183c9d2f (diff)
downloadlibgit2-ebabb88f24cc9f3c1c02cc79cb98d7dc5605fcaa.tar.gz
cmake: update minimum CMake version to v3.5.1
Back in commit cf9f34521 (cmake: bump minimum version to 2.8.11, 2017-09-06), we have bumped the minimum CMake version to require at least v2.8.11. The main hold-backs back then were distributions like RHEL/CentOS as well as Ubuntu Trusty, which caused us to not target a more modern version. Nowadays, Ubuntu Trusty has been EOL'd and CentOS 6 has CMake v3.6.1 available via the EPEL6 repository, and thus it seems fair to upgrade to a more recent version. Going through repology [1], one can see that all supported mainstream distributions do in fact have CMake 3 available. Going through the list, the minimum version that is supported by all mainstream distros is in fact v3.5.1: - CentOS 6 via EPEL6: 3.6.1 - Debian Oldstable: 3.7.2 - Fedora 26: 3.8.2 - OpenMandriva 3.x: 3.5.1 - Slackware 14.2: 3.5.2 - Ubuntu 16.04: 3.5.1 Consequentally, let's upgrade CMake to the minimum version of 3.5.1 and remove all the version CMake checks that aren't required anymore. [1]: https://repology.org/project/cmake/versions
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a8056494e..9d2b0229d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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)