summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2023-03-22 21:50:59 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-03-25 00:29:07 +0100
commit2ffd787a71c8eb5f2fd9096c779d8da21682c017 (patch)
tree273d2e764b0477e1ec20ff0e03450152138762d0 /CMakeLists.txt
parentfe55a63c837a755d022aa53ed4dd637fad5b71ce (diff)
downloadcurl-2ffd787a71c8eb5f2fd9096c779d8da21682c017.tar.gz
CMake: make config version 8 compatible with 7
Reviewed-by: Jakub Zakrzewski Closes #10819
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 874cc4eea..0ddfce9af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1614,6 +1614,15 @@ write_basic_package_version_file(
VERSION ${CURL_VERSION}
COMPATIBILITY SameMajorVersion
)
+file(READ "${version_config}" generated_version_config)
+file(WRITE "${version_config}"
+"if(NOT PACKAGE_FIND_VERSION_RANGE AND PACKAGE_FIND_VERSION_MAJOR STREQUAL \"7\")
+ # Version 8 satisfies version 7... requirements
+ set(PACKAGE_FIND_VERSION_MAJOR 8)
+ set(PACKAGE_FIND_VERSION_COUNT 1)
+endif()
+${generated_version_config}"
+)
# Use:
# * TARGETS_EXPORT_NAME