[cpprestsdk] Update to 2.10.0

This commit is contained in:
Robert Schumacher 2017-10-21 04:04:17 -07:00
parent 6eebc16c9c
commit 3c89015da2
5 changed files with 5 additions and 140 deletions

View File

@ -1,96 +0,0 @@
diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
index 1274102..fe245e6 100644
--- a/Release/CMakeLists.txt
+++ b/Release/CMakeLists.txt
@@ -89,15 +89,6 @@ elseif(UNIX) # This includes OSX
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
option(BUILD_SAMPLES "Build samples." ON)
- option(CASA_INSTALL_HEADERS "Install header files." ON)
- if(CASA_INSTALL_HEADERS)
- file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat)
- install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
- file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
- install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
- file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat)
- install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details)
- endif()
elseif(WIN32)
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
option(BUILD_SAMPLES "Build samples." ON)
@@ -113,37 +104,25 @@ elseif(WIN32)
set(Casablanca_DEFINITIONS "" CACHE INTERNAL "Definitions for consume casablanca library")
endif()
add_definitions(${Casablanca_DEFINITIONS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -DWIN32)
-
- if (NOT CPPREST_EXCLUDE_WEBSOCKETS)
- set(NUGET_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../packages")
- set(PACKAGE_PATHS)
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost.1.58.0.0/")
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_system-vc140.1.58.0-vs140rc/")
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_date_time-vc140.1.58.0-vs140rc/")
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/boost_regex-vc140.1.58.0-vs140rc/")
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/")
- list(APPEND PACKAGE_PATHS "${NUGET_PATH}/zlib.v140.windesktop.msvcstl.static.rt-dyn.1.2.8.8/")
-
- if (NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)
- find_library(Boost_SYSTEM_LIBRARY libboost_system-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib)
- find_library(Boost_DATE_TIME_LIBRARY libboost_date_time-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib)
- find_library(Boost_REGEX_LIBRARY libboost_regex-vc140-mt-gd-1_58.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/address-model-64/lib)
- set(Boost_LIBRARIES ${Boost_REGEX_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
-
- find_library(OpenSSL_libeay_LIBRARY libeay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug)
- find_library(OpenSSL_ssleay_LIBRARY ssleay32.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug)
- find_library(ZLIB_LIBRARY zlibstaticd.lib PATHS ${PACKAGE_PATHS} PATH_SUFFIXES lib/native/v140/windesktop/msvcstl/static/rt-dyn/x64/debug)
- set(OPENSSL_LIBRARIES ${OpenSSL_ssleay_LIBRARY} ${OpenSSL_libeay_LIBRARY} ${ZLIB_LIBRARY})
-
- set(OPENSSL_INCLUDE_DIR "${NUGET_PATH}/openssl.v140.windesktop.msvcstl.static.rt-dyn.x64.1.0.2.1/build/native/include")
- endif()
-
- set(Boost_INCLUDE_DIR "${NUGET_PATH}/boost.1.58.0.0/lib/native/include")
- endif()
+ if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE)
+ find_package(ZLIB REQUIRED)
+ find_package(OpenSSL REQUIRED)
+ find_package(Boost REQUIRED COMPONENTS regex system date_time)
+ endif()
else()
message(FATAL_ERROR "-- Unsupported Build Platform.")
endif()
+option(CASA_INSTALL_HEADERS "Install header files." ON)
+if(CASA_INSTALL_HEADERS)
+ file(GLOB CASA_HEADERS_CPPREST include/cpprest/*.hpp include/cpprest/*.h include/cpprest/*.dat)
+ install(FILES ${CASA_HEADERS_CPPREST} DESTINATION include/cpprest)
+ file(GLOB CASA_HEADERS_PPLX include/pplx/*.hpp include/pplx/*.h)
+ install(FILES ${CASA_HEADERS_PPLX} DESTINATION include/pplx)
+ file(GLOB CASA_HEADERS_DETAILS include/cpprest/details/*.hpp include/cpprest/details/*.h include/cpprest/details/*.dat)
+ install(FILES ${CASA_HEADERS_DETAILS} DESTINATION include/cpprest/details)
+endif()
+
# Compiler (not platform) specific settings
if(ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-strict-aliasing")
diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt
index 4074905..da907e5 100644
--- a/Release/src/CMakeLists.txt
+++ b/Release/src/CMakeLists.txt
@@ -144,10 +144,11 @@ elseif(ANDROID)
else()
set_target_properties(cpprest PROPERTIES
SOVERSION ${CPPREST_VERSION_MAJOR}.${CPPREST_VERSION_MINOR})
-
- install(
- TARGETS cpprest
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- )
endif()
+
+install(
+ TARGETS cpprest
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
\ No newline at end of file

View File

@ -1,13 +0,0 @@
diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt
index fe245e6..94a5c57 100644
--- a/release/CMakeLists.txt
+++ b/release/CMakeLists.txt
@@ -177,7 +177,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries)
# These settings can be used by the test targets
set(Casablanca_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
-if (NOT CPPREST_EXCLUDE_WEBSOCKETS)
+if (NOT CPPREST_EXCLUDE_WEBSOCKETS AND NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)
find_path(WEBSOCKETPP_CONFIG websocketpp-config.cmake
HINTS /usr/lib/cmake/websocketpp)
find_path(WEBSOCKETPP_CONFIG_VERSION websocketpp-configVersion.cmake

View File

@ -1,14 +0,0 @@
diff --git a/Release/src/websockets/client/ws_client_wspp.cpp b/Release/src/websockets/client/ws_client_wspp.cpp
index 9f91d68..4b5d506 100644
--- a/Release/src/websockets/client/ws_client_wspp.cpp
+++ b/Release/src/websockets/client/ws_client_wspp.cpp
@@ -76,7 +76,9 @@ static struct ASIO_SSL_memory_leak_suppress
{
~ASIO_SSL_memory_leak_suppress()
{
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
::SSL_COMP_free_compression_methods();
+#endif
}
} ASIO_SSL_memory_leak_suppressor;

View File

@ -1,5 +1,5 @@
Source: cpprestsdk
Version: 2.9.0-4
Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows)
Version: 2.10.0
Build-Depends: zlib, openssl (windows), boost (windows), websocketpp (windows)
Description: C++11 JSON, REST, and OAuth library
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

View File

@ -3,19 +3,10 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/cpprestsdk
REF v2.9.0
SHA512 7f6af05e2aaf49fb5ba24f4fac43b7787345d46913831504925cefc60d1b62e38457e1d628d5de8b0db891b59716d2bfe63a494ca0b337d67fc9ca5447a5ba9b
REF v2.10.0
SHA512 78e7a38c21db5b563d08cb082bfa96360ac44c66f2189a614d3d2bb71655fd82d931f138590d2dba2d6a4c0884ae37a5be34ea3b753c3517bd68ce490daf60b4
HEAD_REF master
)
if(NOT VCPKG_USE_HEAD_VERSION)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
${CMAKE_CURRENT_LIST_DIR}/0002_no_websocketpp_in_uwp.patch
${CMAKE_CURRENT_LIST_DIR}/0003_openssl_110.patch
)
endif()
set(OPTIONS)
if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
@ -35,15 +26,12 @@ vcpkg_configure_cmake(
-DCPPREST_EXCLUDE_WEBSOCKETS=OFF
-DCPPREST_EXPORT_DIR=share/cpprestsdk
OPTIONS_DEBUG
-DCASA_INSTALL_HEADERS=OFF
-DCPPREST_INSTALL_HEADERS=OFF
)
vcpkg_install_cmake()
if(VCPKG_USE_HEAD_VERSION)
vcpkg_fixup_cmake_targets()
endif()
vcpkg_fixup_cmake_targets()
file(INSTALL
${SOURCE_PATH}/license.txt