From fd93ab3ecc2ddd0fe6600a7e9c394005d4e07ea4 Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Lazo <30321688+EddyTheCo@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:39:27 +0100 Subject: [PATCH] use openssl for android and wasm that already exports the target (#9) --- CMakeLists.txt | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f9c0a3..3754e71 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,22 +55,10 @@ if(NOT OPENSSL_FOUND) FetchContent_Populate(openssl) message(STATUS "openssl is installed in ${openssl_SOURCE_DIR}") set(OPENSSL_FOUND ON) - add_library(OpenSSL::Crypto UNKNOWN IMPORTED) - set_target_properties(OpenSSL::Crypto PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${openssl_SOURCE_DIR}/include") - - if(EMSCRIPTEN) - set_target_properties(OpenSSL::Crypto PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "${openssl_SOURCE_DIR}/libx32/libcrypto.a") - endif(EMSCRIPTEN) - if(ANDROID) - set_target_properties(OpenSSL::Crypto PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES "C" - IMPORTED_LOCATION "${openssl_SOURCE_DIR}/lib/libcrypto.a") - endif(ANDROID) endif(NOT openssl_POPULATED) -endif(EMSCRIPTEN) + include(${openssl_SOURCE_DIR}/openssl.cmake) + create_targets() +endif(EMSCRIPTEN OR ANDROID ) endif(NOT OPENSSL_FOUND) if(OPENSSL_FOUND AND TARGET OpenSSL::Crypto AND Qt6_FOUND)