Show a message if the CMake version is lower than that when consuming
libcurl via the CMake config.
The minimum CMake version on consumption is for now the same as
the minimum required (v3.7) to build curl itself.
Ref: https://cmake.org/cmake/help/v3.7/variable/CMAKE_MINIMUM_REQUIRED_VERSION.html
Ref: #18704 (discussion)
Follow-up to
16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973
Closes #19776
option(CURL_USE_PKGCONFIG "Enable pkg-config to detect @PROJECT_NAME@ dependencies. Default: @CURL_USE_PKGCONFIG@"
"@CURL_USE_PKGCONFIG@")
+if(CMAKE_VERSION VERSION_LESS @CMAKE_MINIMUM_REQUIRED_VERSION@)
+ message(STATUS "@PROJECT_NAME@: @PROJECT_NAME@-specific Find modules require "
+ "CMake @CMAKE_MINIMUM_REQUIRED_VERSION@ or upper, found: ${CMAKE_VERSION}.")
+endif()
+
include(CMakeFindDependencyMacro)
if("@USE_OPENSSL@")
${_generated_version_config}")
# Consumed custom variables:
+ # CMAKE_MINIMUM_REQUIRED_VERSION
# CURLVERSION
# LIBCURL_PC_LIBS_PRIVATE_LIST
# LIB_NAME