mirror of
https://github.com/libssh2/libssh2.git
synced 2025-12-09 15:41:11 +03:00
cmake: verify minimum CMake version in libssh2-config.cmake
This is the same minimum version required to build libssh2 itself (3.7). Closes #1754
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
option(LIBSSH2_USE_PKGCONFIG "Enable pkg-config to detect @PROJECT_NAME@ dependencies. Default: @LIBSSH2_USE_PKGCONFIG@"
|
||||
"@LIBSSH2_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)
|
||||
|
||||
set(_libssh2_cmake_module_path_save ${CMAKE_MODULE_PATH})
|
||||
|
||||
@@ -397,6 +397,7 @@ if(NOT LIBSSH2_DISABLE_INSTALL)
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
# Consumed variables:
|
||||
# CMAKE_MINIMUM_REQUIRED_VERSION
|
||||
# CRYPTO_BACKEND
|
||||
# LIB_NAME
|
||||
# LIB_SELECTED
|
||||
|
||||
Reference in New Issue
Block a user