summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2021-07-23 15:35:44 +0200
committerGitHub <noreply@github.com>2021-07-23 15:35:44 +0200
commit9f742632bae28dea97d6c4b77038608e932d05eb (patch)
tree78784353dfbb3baa186a6f55a5813b108e96eb89
parentee695c78954edded24e5674722869daa69fd230a (diff)
parent3914c2cb8384444b82df9a706cb8a3e5a04eee49 (diff)
downloadlibexpat-git-9f742632bae28dea97d6c4b77038608e932d05eb.tar.gz
Merge pull request #507 from libexpat/autotools-sync-cmake-files
Autotools: Get CMake templates back in sync with CMake of GitHub Actions image "ubuntu-20.04"
-rw-r--r--expat/cmake/autotools/expat-config-version.cmake.in3
-rw-r--r--expat/cmake/autotools/expat.cmake2
2 files changed, 4 insertions, 1 deletions
diff --git a/expat/cmake/autotools/expat-config-version.cmake.in b/expat/cmake/autotools/expat-config-version.cmake.in
index 5b296752..abdda6e9 100644
--- a/expat/cmake/autotools/expat-config-version.cmake.in
+++ b/expat/cmake/autotools/expat-config-version.cmake.in
@@ -17,6 +17,9 @@ else()
if("@PACKAGE_VERSION@" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
+ if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
+ string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
+ endif()
else()
set(CVF_VERSION_MAJOR "@PACKAGE_VERSION@")
endif()
diff --git a/expat/cmake/autotools/expat.cmake b/expat/cmake/autotools/expat.cmake
index cb7444c9..cc2eb1f5 100644
--- a/expat/cmake/autotools/expat.cmake
+++ b/expat/cmake/autotools/expat.cmake
@@ -4,7 +4,7 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
-cmake_policy(VERSION 2.6...3.18)
+cmake_policy(VERSION 2.6...3.19)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------