summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2021-04-01 05:32:05 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2021-03-31 23:26:41 -0700
commitad32d8faee540b8cd247703ae9aa0a873054b8a5 (patch)
tree465de3c47699f3f2c3d8be712f50bce6967251ea /CMakeLists.txt
parent4da42f0ffb832bffe75ada174caad47412d2a0a4 (diff)
downloadrabbitmq-c-ad32d8faee540b8cd247703ae9aa0a873054b8a5.tar.gz
cmake: set v3.10 as minimum required version
CMake v3.10 is available on most LTS systems (Ubuntu 18.04+, RHEL/CentOS 8, Debian Stable, Fedora 32, FreeBSD and OpenBSD). And thus can be tested. Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b490ab5..10aabe7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,11 @@
-cmake_minimum_required(VERSION 2.8.12)
-project(rabbitmq-c "C")
+cmake_minimum_required(VERSION 3.10...3.18)
-# Enable MACOSX_RPATH by default. See: cmake --help-policy CMP0042
-if (POLICY CMP0042)
- cmake_policy(SET CMP0042 NEW)
+if(${CMAKE_VERSION} VERSION_LESS 3.12)
+ cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
+project(rabbitmq-c "C")
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Follow all steps below in order to calculate new ABI version when updating the library