aboutsummaryrefslogtreecommitdiff
path: root/LibreSSLConfig.cmake.in
diff options
context:
space:
mode:
authorPierre Wendling <pierre.wendling.4@gmail.com>2023-08-06 15:07:31 -0400
committerPierre Wendling <pierre.wendling.4@gmail.com>2023-08-19 12:16:15 -0400
commita89cd65980153ef60b42cb26d3bef949751f87f1 (patch)
tree15d4693562c401d0bbc0b3812d983ca1ac0391cb /LibreSSLConfig.cmake.in
parent5432e22b25026fb50b00ab5dcf894e18daa8bcb6 (diff)
downloadportable-a89cd65980153ef60b42cb26d3bef949751f87f1.tar.gz
portable-a89cd65980153ef60b42cb26d3bef949751f87f1.tar.bz2
portable-a89cd65980153ef60b42cb26d3bef949751f87f1.zip
CMake: Export and install library targets.
The configs can be consumed by setting LibreSSL_DIR to the build directory, or after installation using CMAKE_PREFIX_PATH/LibreSSL_DIR. For compatibility, the EXPORT_NAME of targets and the LIBRESSL_* variables are set to match the names used in FindLibreSSL.
Diffstat (limited to 'LibreSSLConfig.cmake.in')
-rw-r--r--LibreSSLConfig.cmake.in33
1 files changed, 33 insertions, 0 deletions
diff --git a/LibreSSLConfig.cmake.in b/LibreSSLConfig.cmake.in
new file mode 100644
index 0000000..d6fbe3b
--- /dev/null
+++ b/LibreSSLConfig.cmake.in
@@ -0,0 +1,33 @@
1@PACKAGE_INIT@
2
3set(LIBRESSL_VERSION @VERSION@)
4set_and_check(LIBRESSL_INCLUDE_DIR @PACKAGE_INCLUDE_DIRECTORY@)
5
6if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/LibreSSL-Crypto.cmake")
7 include("${CMAKE_CURRENT_LIST_DIR}/LibreSSL-Crypto.cmake")
8 set(LIBRESSL_CRYPTO_LIBRARY LibreSSL::Crypto)
9endif()
10
11if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/LibreSSL-SSL.cmake")
12 include("${CMAKE_CURRENT_LIST_DIR}/LibreSSL-SSL.cmake")
13 set(LIBRESSL_SSL_LIBRARY LibreSSL::SSL)
14endif()
15
16if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/LibreSSL-TLS.cmake")
17 include("${CMAKE_CURRENT_LIST_DIR}/LibreSSL-TLS.cmake")
18 set(LIBRESSL_TLS_LIBRARY LibreSSL::TLS)
19endif()
20
21set(LIBRESSL_LIBRARIES
22 ${LIBRESSL_CRYPTO_LIBRARY}
23 ${LIBRESSL_SSL_LIBRARY}
24 ${LIBRESSL_TLS_LIBRARY}
25)
26
27check_required_components(
28 Crypto
29 SSL
30 TLS
31)
32
33set(LIBRESSL_FOUND TRUE)