| 1 |
include(CMakeFindDependencyMacro) |
| 2 |
|
| 3 |
find_dependency(aws-c-common) |
| 4 |
|
| 5 |
if (NOT @BYO_CRYPTO@ AND (@AWS_USE_LIBCRYPTO_TO_SUPPORT_ED25519_EVERYWHERE@ OR (NOT WIN32 AND NOT APPLE))) |
| 6 |
if (@USE_OPENSSL@ AND NOT ANDROID) |
| 7 |
# aws-c-cal has been built with a dependency on OpenSSL::Crypto, |
| 8 |
# therefore consumers of this library have a dependency on OpenSSL and must have it found |
| 9 |
find_dependency(OpenSSL REQUIRED) |
| 10 |
find_dependency(Threads REQUIRED) |
| 11 |
else() |
| 12 |
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules") |
| 13 |
find_dependency(crypto) |
| 14 |
endif() |
| 15 |
endif() |
| 16 |
|
| 17 |
macro(aws_load_targets type) |
| 18 |
include(${CMAKE_CURRENT_LIST_DIR}/${type}/@[email protected]) |
| 19 |
endmacro() |
| 20 |
|
| 21 |
# try to load the lib follow BUILD_SHARED_LIBS. Fall back if not exist. |
| 22 |
if (BUILD_SHARED_LIBS) |
| 23 |
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/shared") |
| 24 |
aws_load_targets(shared) |
| 25 |
else() |
| 26 |
aws_load_targets(static) |
| 27 |
endif() |
| 28 |
else() |
| 29 |
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/static") |
| 30 |
aws_load_targets(static) |
| 31 |
else() |
| 32 |
aws_load_targets(shared) |
| 33 |
endif() |
| 34 |
endif() |