From c66c3a936a69012c92d3f3af48dda7448e6c154f Mon Sep 17 00:00:00 2001 From: Xavrax Date: Thu, 28 Mar 2024 10:22:32 +0100 Subject: [PATCH] windows windows windows - why are you still here? --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59ad1aa0..95c8bc56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -356,9 +356,13 @@ if(${OPENSSL}) set(OPENSSL_LINK_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) else() message(STATUS "Searching for custom OpenSSL library") - - find_library(OpenSSL REQUIRED NAMES ssl PATHS ${OPENSSL_ROOT_DIR}/${CUSTOM_OPENSSL_LIB_DIR} NO_DEFAULT_PATH) - find_library(Crypto REQUIRED NAMES crypto PATHS ${OPENSSL_ROOT_DIR}/${CUSTOM_OPENSSL_LIB_DIR} NO_DEFAULT_PATH) + if(WIN32 OR WIN64 OR MSVC) + find_library(OpenSSL REQUIRED NAMES libssl PATHS ${OPENSSL_ROOT_DIR}/${CUSTOM_OPENSSL_LIB_DIR} NO_DEFAULT_PATH) + find_library(Crypto REQUIRED NAMES libcrypto PATHS ${OPENSSL_ROOT_DIR}/${CUSTOM_OPENSSL_LIB_DIR} NO_DEFAULT_PATH) + else() + find_library(OpenSSL REQUIRED NAMES ssl PATHS ${OPENSSL_ROOT_DIR}/${CUSTOM_OPENSSL_LIB_DIR} NO_DEFAULT_PATH) + find_library(Crypto REQUIRED NAMES crypto PATHS ${OPENSSL_ROOT_DIR}/${CUSTOM_OPENSSL_LIB_DIR} NO_DEFAULT_PATH) + endif() message(STATUS "Used libraries:") message(STATUS "-> ${OpenSSL}")