| 1 |
# Copyright (C) The libssh2 project and its contributors. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
include(CMakeFindDependencyMacro) |
| 5 |
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) |
| 6 |
|
| 7 |
if("@CRYPTO_BACKEND@" STREQUAL "OpenSSL") |
| 8 |
find_dependency(OpenSSL) |
| 9 |
elseif("@CRYPTO_BACKEND@" STREQUAL "wolfSSL") |
| 10 |
find_dependency(WolfSSL) |
| 11 |
elseif("@CRYPTO_BACKEND@" STREQUAL "Libgcrypt") |
| 12 |
find_dependency(Libgcrypt) |
| 13 |
elseif("@CRYPTO_BACKEND@" STREQUAL "mbedTLS") |
| 14 |
find_dependency(MbedTLS) |
| 15 |
endif() |
| 16 |
|
| 17 |
if(@ZLIB_FOUND@) |
| 18 |
find_dependency(ZLIB) |
| 19 |
endif() |
| 20 |
|
| 21 |
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") |
| 22 |
|
| 23 |
# Alias for either shared or static library |
| 24 |
if(NOT TARGET @PROJECT_NAME@::@LIB_NAME@) |
| 25 |
add_library(@PROJECT_NAME@::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@) |
| 26 |
endif() |
| 27 |
|
| 28 |
# Compatibility alias |
| 29 |
if(NOT TARGET Libssh2::@LIB_NAME@) |
| 30 |
add_library(Libssh2::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@) |
| 31 |
endif() |