Created
June 9, 2020 11:39
-
-
Save TerryGeng/eadb589611732a6622b40199448dd5e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | |
index 649b1cf3..5ecf7dcd 100644 | |
--- a/src/CMakeLists.txt | |
+++ b/src/CMakeLists.txt | |
@@ -22,6 +22,21 @@ find_pkg(Qt5 | |
REQUIRED | |
) | |
+# OpenSSL | |
+find_package(OpenSSL REQUIRED) | |
+if(OPENSSL_FOUND) | |
+ if(APPLE) | |
+ set(OPENSSL_ROOT_DIR ${OPENSSL_ROOT_DIR} /usr/local/Cellar/[email protected]/1.1.1g/) | |
+ set(OPENSSL_CRYPTO_LIBRARY ${OPENSSL_ROOT_DIR}/lib/libcrypto.dylib CACHE FILEPATH "" FORCE) | |
+ set(OPENSSL_SSL_LIBRARY ${OPENSSL_ROOT_DIR}/lib/libssl.dylib CACHE FILEPATH "" FORCE) | |
+ message(STATUS "APPLE OpenSSL Version: ${OPENSSL_VERSION} ${OPENSSL_INCLUDE_DIR} ${OPENSSL_LIBRARIES}") | |
+ else() | |
+ include_directories(${OPENSSL_INCLUDE_DIR}) | |
+ list(APPEND LIB_LIST ${OPENSSL_LIBRARIES}) | |
+ message(STATUS "OpenSSL Version: ${OPENSSL_VERSION} ${OPENSSL_INCLUDE_DIR} ${OPENSSL_LIBRARIES}") | |
+ endif() | |
+endif() | |
+ | |
find_pkg(OpenSSL | |
COMPONENTS | |
Crypto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment