From 18ded9ccf3d0b46c208a29de47550ed0209a02e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Tue, 11 Sep 2018 15:44:40 +0200 Subject: [PATCH] Use static version of libcurl. Note that this will simplify the packaging/deployment --- cmake/findDependencies.cmake | 2 +- conanfile.py | 4 ++-- src/CMakeLists.txt | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake index a3b3c438..d49ea3f9 100644 --- a/cmake/findDependencies.cmake +++ b/cmake/findDependencies.cmake @@ -26,7 +26,7 @@ endif( ) if( EXIV2_ENABLE_WEBREADY ) set( ENABLE_WEBREADY 1 ) if( EXIV2_ENABLE_CURL ) - find_package( CURL REQUIRED) + find_package(CURL REQUIRED) endif() if( EXIV2_ENABLE_SSH ) diff --git a/conanfile.py b/conanfile.py index 74435ae2..cc693dbf 100644 --- a/conanfile.py +++ b/conanfile.py @@ -14,8 +14,8 @@ class Exiv2Conan(ConanFile): ) def configure(self): - if not os_info.is_macos: - self.options['libcurl'].shared = True + self.options['libcurl'].shared = False + self.options['libcurl'].with_openssl = True self.options['gtest'].shared = True def requirements(self): diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index de345786..1fefafe0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -239,10 +239,12 @@ if (EXIV2_ENABLE_WEBREADY) if( EXIV2_ENABLE_CURL ) target_include_directories(exiv2lib SYSTEM PUBLIC ${CURL_INCLUDE_DIR} ) - target_link_libraries(exiv2lib PUBLIC ${CURL_LIBRARIES}) if (USING_CONAN) + target_link_libraries(exiv2lib PUBLIC ${CONAN_LIBS_LIBCURL} ${CONAN_LIBS_OPENSSL}) target_compile_definitions(exiv2lib PUBLIC ${CONAN_COMPILE_DEFINITIONS_LIBCURL}) target_link_libraries(exiv2lib PUBLIC ${CONAN_EXE_LINKER_FLAGS_LIBCURL}) + else() + target_link_libraries(exiv2lib PUBLIC ${CURL_LIBRARIES}) endif() endif()