changeset 1527:7b58e0048874

Upgrade to curl 7.44.0 for static and Windows builds
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Aug 2015 11:17:43 +0200
parents 096a8af528c9
children 4d0e669ade83
files NEWS Resources/CMake/LibCurlConfiguration.cmake UnitTestsSources/VersionsTests.cpp
diffstat 3 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Wed Aug 12 10:43:10 2015 +0200
+++ b/NEWS	Wed Aug 12 11:17:43 2015 +0200
@@ -3,6 +3,7 @@
 
 * "limit" and "since" arguments while retrieving DICOM resources in the REST API
 * Support of "deflate" and "gzip" content-types in HTTP requests
+* Upgrade to curl 7.44.0 for static and Windows builds
 
 
 Version 0.9.3 (2015/08/07)
--- a/Resources/CMake/LibCurlConfiguration.cmake	Wed Aug 12 10:43:10 2015 +0200
+++ b/Resources/CMake/LibCurlConfiguration.cmake	Wed Aug 12 11:17:43 2015 +0200
@@ -1,17 +1,18 @@
 if (STATIC_BUILD OR NOT USE_SYSTEM_CURL)
-  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-7.26.0)
+  SET(CURL_SOURCES_DIR ${CMAKE_BINARY_DIR}/curl-7.44.0)
   DownloadPackage(
-    "3fa4d5236f2a36ca5c3af6715e837691"
-    "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/curl-7.26.0.tar.gz"
+    "cf46112b5151e2f1a3fd38439bdade23"
+    "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/curl-7.44.0.tar.gz"
     "${CURL_SOURCES_DIR}")
 
-  include_directories(${CURL_SOURCES_DIR}/include)
+  include_directories(
+    ${CURL_SOURCES_DIR}/include
+    )
+
   AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib CURL_SOURCES)
+  AUX_SOURCE_DIRECTORY(${CURL_SOURCES_DIR}/lib/vtls CURL_SOURCES)
   source_group(ThirdParty\\LibCurl REGULAR_EXPRESSION ${CURL_SOURCES_DIR}/.*)
 
-  #add_library(Curl STATIC ${CURL_SOURCES})
-  #link_libraries(Curl)  
-
   add_definitions(
     -DCURL_STATICLIB=1
     -DBUILDING_LIBCURL=1
@@ -52,7 +53,14 @@
 
     set_property(
       SOURCE ${CURL_SOURCES}
-      PROPERTY COMPILE_DEFINITIONS "HAVE_TIME_H;HAVE_STRUCT_TIMEVAL;HAVE_SYS_STAT_H;HAVE_SOCKET;HAVE_STRUCT_SOCKADDR_STORAGE;HAVE_SYS_SOCKET_H;HAVE_SOCKET;HAVE_SYS_SOCKET_H;HAVE_NETINET_IN_H;HAVE_NETDB_H;HAVE_FCNTL_O_NONBLOCK;HAVE_FCNTL_H;HAVE_SELECT;HAVE_ERRNO_H;HAVE_SEND;HAVE_RECV;OS=\"${TMP_OS}\"")
+      PROPERTY COMPILE_DEFINITIONS "HAVE_TIME_H;HAVE_STRUCT_TIMEVAL;HAVE_SYS_STAT_H;HAVE_SOCKET;HAVE_STRUCT_SOCKADDR_STORAGE;HAVE_SYS_SOCKET_H;HAVE_SOCKET;HAVE_SYS_SOCKET_H;HAVE_NETINET_IN_H;HAVE_NETDB_H;HAVE_FCNTL_O_NONBLOCK;HAVE_FCNTL_H;HAVE_SELECT;HAVE_ERRNO_H;HAVE_SEND;HAVE_RECV;HAVE_LONGLONG;OS=\"${TMP_OS}\""
+      )
+
+    if (MSVC)
+      set_property(SOURCE ${CURL_SOURCES} PROPERTY COMPILE_FLAGS "/I${CURL_SOURCES_DIR}/lib")
+    else()
+      set_property(SOURCE ${CURL_SOURCES} PROPERTY COMPILE_FLAGS "-I${CURL_SOURCES_DIR}/lib")
+    endif()
 
     if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
       add_definitions(
--- a/UnitTestsSources/VersionsTests.cpp	Wed Aug 12 10:43:10 2015 +0200
+++ b/UnitTestsSources/VersionsTests.cpp	Wed Aug 12 11:17:43 2015 +0200
@@ -104,7 +104,7 @@
 TEST(Versions, CurlStatic)
 {
   curl_version_info_data* v = curl_version_info(CURLVERSION_NOW);
-  ASSERT_STREQ("7.26.0", v->version);
+  ASSERT_STREQ("7.44.0", v->version);
 }
 
 TEST(Versions, PngStatic)