conan: Upgrade libcurl version

Thanks to this upgrade the cmake code that handles the CURL dependency
can be simplified. Now we can use the shared version of CURL in all the
platforms. However we will use for the moment the static version on Mac,
since we are having some issues with 'make tests'. Once those tests are
migrated to python we can also use the shared version there.
v0.27.3
Luis Díaz Más 7 years ago
parent 96f03ea096
commit c3629117d8

@ -14,8 +14,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_MACOSX_RPATH ON) set(CMAKE_MACOSX_RPATH ON)
if (APPLE) if (APPLE)
set(CMAKE_INSTALL_RPATH "@executable_path/../lib") set(CMAKE_INSTALL_RPATH "@loader_path")
endif() endif()
set( PACKAGE_COPYRIGHT "Andreas Huggel" ) set( PACKAGE_COPYRIGHT "Andreas Huggel" )

@ -8,17 +8,14 @@ class Exiv2Conan(ConanFile):
default_options = 'unitTests=True' default_options = 'unitTests=True'
def configure(self): def configure(self):
# Note : The linking in exiv2lib fails if we try to use the static version of libcurl. if not os_info.is_macos:
# The libcurl CMake code is not mature enough and therefore the conan recipe for
# Windows also has some problems (since it uses CMake for configuring the project).
if os_info.is_windows:
self.options['libcurl'].shared = True self.options['libcurl'].shared = True
self.options['gtest'].shared = True self.options['gtest'].shared = True
def requirements(self): def requirements(self):
self.requires('Expat/2.2.5@pix4d/stable') self.requires('Expat/2.2.5@pix4d/stable')
self.requires('zlib/1.2.11@conan/stable') self.requires('zlib/1.2.11@conan/stable')
self.requires('libcurl/7.56.1@bincrafters/stable') # from conan-bincrafters self.requires('libcurl/7.60.0@bincrafters/stable')
if self.options.unitTests: if self.options.unitTests:
self.requires('gtest/1.8.0@bincrafters/stable') self.requires('gtest/1.8.0@bincrafters/stable')

@ -229,19 +229,11 @@ if (EXIV2_ENABLE_WEBREADY)
if( EXIV2_ENABLE_CURL ) if( EXIV2_ENABLE_CURL )
target_include_directories(exiv2lib SYSTEM PUBLIC ${CURL_INCLUDE_DIR} ) target_include_directories(exiv2lib SYSTEM PUBLIC ${CURL_INCLUDE_DIR} )
target_link_libraries(exiv2lib PUBLIC ${CURL_LIBRARIES})
if (USING_CONAN) if (USING_CONAN)
# TODO : Improve libcurl recipe so we do not need to have all these conditionals here
if ( MSVC )
target_link_libraries( exiv2lib PUBLIC ${CURL_LIBRARY})
else()
target_link_libraries( exiv2lib PUBLIC ${CONAN_LIBS_LIBCURL})
endif()
target_compile_definitions(exiv2lib PUBLIC ${CONAN_COMPILE_DEFINITIONS_LIBCURL}) target_compile_definitions(exiv2lib PUBLIC ${CONAN_COMPILE_DEFINITIONS_LIBCURL})
else() target_link_libraries(exiv2lib PUBLIC ${CONAN_EXE_LINKER_FLAGS_LIBCURL})
target_link_libraries( exiv2lib PUBLIC ${CURL_LIBRARIES})
endif() endif()
endif() endif()
endif() endif()

Loading…
Cancel
Save