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"
This commit is contained in:
Sebastian Pipping 2021-07-23 15:35:44 +02:00 committed by GitHub
commit 9f742632ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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()

View File

@ -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.
#----------------------------------------------------------------