From 44d47833091275afa69c8bff9498c70c729784e8 Mon Sep 17 00:00:00 2001 From: Tom Lankhorst Date: Sat, 2 Mar 2019 09:23:13 +0100 Subject: [PATCH] Split linking cURL and SSL --- src/openrct2/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index ad113fb73f..fee9a053bb 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -34,8 +34,13 @@ else () endif () endif () -if (NOT DISABLE_NETWORK AND NOT DISABLE_HTTP) +if (NOT DISABLE_NETWORK OR NOT DISABLE_HTTP) find_package(OpenSSL 1.0.0 REQUIRED) + if(STATIC) + target_link_libraries(${PROJECT} ${SSL_STATIC_LIBRARIES}) + else () + target_link_libraries(${PROJECT} ${OPENSSL_LIBRARIES}) + endif() endif () if (NOT DISABLE_NETWORK AND WIN32) @@ -50,11 +55,9 @@ if (NOT DISABLE_HTTP) PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl) endif () if (STATIC) - target_link_libraries(${PROJECT} ${LIBCURL_STATIC_LIBRARIES} - ${SSL_STATIC_LIBRARIES}) + target_link_libraries(${PROJECT} ${LIBCURL_STATIC_LIBRARIES}) else () - target_link_libraries(${PROJECT} ${LIBCURL_LIBRARIES} - ${OPENSSL_LIBRARIES}) + target_link_libraries(${PROJECT} ${LIBCURL_LIBRARIES}) endif () endif ()