]> granicus.if.org Git - graphviz/commitdiff
bump required CMake version to 3.13.0
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 13 Oct 2022 00:52:52 +0000 (17:52 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 Oct 2022 00:00:28 +0000 (17:00 -0700)
This allows dropping several workarounds in the CMake build system. The only
supported platform with a CMake version less than 3.13.0 is Ubuntu 18.04. Given
CMake is not the default build system, the age of Ubuntu 18.04 makes it unlikely
there are users there building Graphviz from source, and later CMake versions
are easily obtainable from Kitware, it seems reasonable to increase this
requirement.

Gitlab: #2290

CHANGELOG.md
CMakeLists.txt
cmake/FindCAIRO.cmake
cmake/FindPANGOCAIRO.cmake

index c3cf7ddcb67a3001cfdfa2d1ef57f7e34d3d0725..484da7f3139a3d004ba666b190c1a7e5b59ca84e 100644 (file)
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - **Breaking**: An `outline_height` field has been added to the `Agnodeinfo_t`
   struct.
 - When using the CMake build system, the minimum requirement has been increased
-  from CMake 3.9 to CMake 3.10.2.
+  from CMake 3.9 to CMake 3.13.0.
 - When compiling Graphviz with the Intel C Compiler, the Autotools build system
   no longer suppresses `-ffast-math`. Users relying on this are encouraged to
   investigate what in their build environment is appending a flag their C
index aa8a33e7e6abbf21e21f432761582fde1aedeb49..b609dfc33843034dc869d9557b5c7b7e9315bcd4 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR)
 project(Graphviz)
 
 include(FeatureSummary)
@@ -143,14 +143,7 @@ endif()
 
 # ============================ Set Graphviz version ============================
 
-if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
-  find_program(Python3_EXECUTABLE NAMES python3 python3.exe python.exe)
-else()
-  find_package(Python3 COMPONENTS Interpreter)
-endif()
-if(NOT Python3_EXECUTABLE)
-  message(FATAL_ERROR "Python 3 not found")
-endif()
+find_package(Python3 REQUIRED COMPONENTS Interpreter)
 
 if(DEFINED VERSION)
   set(GRAPHVIZ_VERSION_STRING "${VERSION}")
@@ -246,11 +239,7 @@ endif()
 
 if(use_coverage)
   add_compile_options("-coverage")
-  if(${CMAKE_VERSION} VERSION_LESS "3.13.0")
-    link_libraries("-coverage")
-  else()
-    add_link_options("-coverage")
-  endif()
+  add_link_options("-coverage")
 endif()
 
 # ============================ Packaging information ===========================
index 5d706b61447dd1b6d8d8212fdaee230dfa1687ff..a92916eb9b948e99e89b0a26f12b15289c51e2f6 100644 (file)
@@ -38,12 +38,6 @@ else()
   find_package(PkgConfig)
   pkg_check_modules(CAIRO cairo)
 
-  # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it
-  # manually
-  if(${CMAKE_VERSION} VERSION_LESS 3.12)
-    find_library(CAIRO_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH)
-  endif()
-
   find_package_handle_standard_args(CAIRO DEFAULT_MSG
     CAIRO_INCLUDE_DIRS
     CAIRO_LIBRARIES
index e045e8ff61c485834b751a480f9fd4dd9a411758..b92e5bea9636f8eb124e5054047019e7686e0e2a 100644 (file)
@@ -80,13 +80,6 @@ else()
   find_package(PkgConfig)
   pkg_check_modules(PANGOCAIRO pangocairo)
 
-  # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it
-  # manually
-  if(${CMAKE_VERSION} VERSION_LESS 3.12)
-    find_library(PANGOCAIRO_LINK_LIBRARIES pangocairo-1.0
-      PATHS ENV LIBRARY_PATH)
-  endif()
-
   find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG
     PANGOCAIRO_INCLUDE_DIRS
     PANGOCAIRO_LIBRARIES