From 830b1a8a8d09d5b0ddedc4ae8cbca230378187e1 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 5 Oct 2023 21:23:18 +0200 Subject: [PATCH] CMAKE: try to fix curl --- 3rdparty/curl/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/3rdparty/curl/CMakeLists.txt b/3rdparty/curl/CMakeLists.txt index 7554225be0..0dc9c9f470 100644 --- a/3rdparty/curl/CMakeLists.txt +++ b/3rdparty/curl/CMakeLists.txt @@ -8,6 +8,9 @@ if(USE_SYSTEM_CURL) else() message(STATUS "RPCS3: building libcurl + wolfssl submodules") set(BUILD_CURL_EXE OFF CACHE BOOL "Set to ON to build curl executable.") + set(BUILD_STATIC_CURL OFF CACHE BOOL "Set to ON to build curl executable with static libcurl.") + set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libcurl.") + set(BUILD_SHARED_LIBS OFF CACHE BOOL "Set to ON to build shared libcurl.") # If set to ON then CURL can not find our wolfssl set(CURL_USE_WOLFSSL OFF CACHE BOOL "enable wolfSSL for SSL/TLS") set(CURL_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental") @@ -28,10 +31,11 @@ else() add_subdirectory(curl EXCLUDE_FROM_ALL) - target_link_libraries(libcurl_object PRIVATE wolfssl) + target_link_libraries(libcurl_static PRIVATE wolfssl) if(MSVC) - target_compile_definitions(libcurl_object PRIVATE HAVE_SSIZE_T) + target_compile_definitions(libcurl_static PRIVATE HAVE_SSIZE_T) endif() + add_library(3rdparty_libcurl INTERFACE) target_link_libraries(3rdparty_libcurl INTERFACE libcurl_static)