From 9f8986d6b8e6ee9d2df9ff4184c7a3f84d389a04 Mon Sep 17 00:00:00 2001 From: Fabian Klebert Date: Wed, 24 Apr 2024 16:01:26 +0200 Subject: [PATCH] Guard OpenSSL find_package --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cc9095..8b6e6e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,10 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${ZSWAG_DEPLOY_DIR}") ############## # dependencies -find_package(OpenSSL CONFIG REQUIRED) +if(NOT TARGET OpenSSL) + find_package(OpenSSL CONFIG REQUIRED) +endif() + if(ZSWAG_KEYCHAIN_SUPPORT) find_package(keychain CONFIG REQUIRED) endif()