From d0cc5a6d4cf124ed42b8df061cd857144e372888 Mon Sep 17 00:00:00 2001 From: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com> Date: Mon, 17 Jul 2023 15:36:43 +0200 Subject: [PATCH] Fixing OpenSSL search on installer (#3717) Signed-off-by: Miguel Barro --- src/cpp/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index b44aa6cba99..efff95a806f 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -708,7 +708,11 @@ if(LINK_SSL) find_package(OpenSSL REQUIRED)\n\ endfunction()" ) - set(FASTRTPS_INSTALLER_OPT_DEPS "find_fastdds_deployed_openssl()") + set(FASTRTPS_INSTALLER_OPT_DEPS "\ + if (\${type} STREQUAL \"static\")\n\ + find_fastdds_deployed_openssl()\n\ + endif()") + elseif(WIN32) # windows from sources only requires OpenSSL on static libraries set(FASTRTPS_PACKAGE_WIN32_OPT_DEPS "find_package(OpenSSL REQUIRED)")