From 9c81f1c045ea26e026c5a51f3f9429d7d0f80e88 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 5 Mar 2025 21:48:34 -0500 Subject: [PATCH] build: moving find_package for openssl to net/CMakeLists.txt --- cmake/Libraries.cmake | 11 ----------- src/lib/net/CMakeLists.txt | 9 +++++++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake index 3f335895f..e007a79d1 100644 --- a/cmake/Libraries.cmake +++ b/cmake/Libraries.cmake @@ -37,17 +37,6 @@ macro(configure_libs) message(STATUS "Qt version: ${Qt6_VERSION}") - # TODO SSL check can happen in lib/net when don't have to deploy it any longer on windows - - # Apple has to use static libraries because "Use of the Apple-provided OpenSSL - # libraries by apps is strongly discouraged." - # https://developer.apple.com/library/archive/documentation/Security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html - if(APPLE) - set(OPENSSL_USE_STATIC_LIBS TRUE) - endif() - - find_package(OpenSSL ${REQUIRED_OPENSSL_VERSION} REQUIRED COMPONENTS SSL Crypto) - option(ENABLE_COVERAGE "Enable test coverage" OFF) if(ENABLE_COVERAGE) message(STATUS "Enabling code coverage") diff --git a/src/lib/net/CMakeLists.txt b/src/lib/net/CMakeLists.txt index 16e911dd9..705e55e79 100644 --- a/src/lib/net/CMakeLists.txt +++ b/src/lib/net/CMakeLists.txt @@ -3,6 +3,15 @@ # SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton # SPDX-License-Identifier: MIT +# Apple has to use static libraries because "Use of the Apple-provided OpenSSL +# libraries by apps is strongly discouraged." +# https://developer.apple.com/library/archive/documentation/Security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html +if(APPLE) + set(OPENSSL_USE_STATIC_LIBS TRUE) +endif() + +find_package(OpenSSL ${REQUIRED_OPENSSL_VERSION} REQUIRED COMPONENTS SSL Crypto) + add_library(net STATIC FingerprintData.cpp FingerprintData.h