Propagate CURL linkage when it is enabled

This commit is contained in:
Luis Díaz Más 2018-12-20 22:57:12 +01:00 committed by Luis Diaz Mas
parent 2432b7a057
commit 4fa2bc7008
3 changed files with 7 additions and 4 deletions

View File

@ -16,7 +16,7 @@ class Exiv2Conan(ConanFile):
)
def configure(self):
self.options['libcurl'].shared = False
self.options['libcurl'].shared = True
self.options['libcurl'].with_openssl = True
self.options['gtest'].shared = True

View File

@ -4,6 +4,10 @@
#include <exiv2/exiv2.hpp>
#ifdef EXV_USE_CURL
#include <curl/curl.h>
#endif
#include <iostream>
#include <cstdlib>

View File

@ -174,12 +174,11 @@ 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_link_libraries(exiv2lib PUBLIC ${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 PRIVATE ${CURL_LIBRARIES})
endif()
endif()