aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-10-23 13:05:43 -0700
committerGitHub <noreply@github.com>2018-10-23 13:05:43 -0700
commit8d62a87448c2ee122ce15c0074f5738d95d1bf94 (patch)
treea355f569008fd8c02dfbd06965374df148954844
parent8675caad70c2261d36b9b2405345c51ac613b5f5 (diff)
downloadvcpkg-8d62a87448c2ee122ce15c0074f5738d95d1bf94.tar.gz
vcpkg-8d62a87448c2ee122ce15c0074f5738d95d1bf94.zip
[cpprestsdk] Add feature for websockets (#4530)
-rw-r--r--ports/cpprestsdk/CONTROL9
-rw-r--r--ports/cpprestsdk/portfile.cmake7
2 files changed, 13 insertions, 3 deletions
diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL
index 2693d2390..7a95faeb9 100644
--- a/ports/cpprestsdk/CONTROL
+++ b/ports/cpprestsdk/CONTROL
@@ -1,5 +1,10 @@
Source: cpprestsdk
-Version: 2.10.6-1
-Build-Depends: zlib, openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp), websocketpp (!uwp), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows)
+Version: 2.10.6-2
+Build-Depends: zlib, openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!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.
+Default-Features: websockets
+
+Feature: websockets
+Build-Depends: websocketpp (!uwp)
+Description: Websockets support
diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake
index c84e6ff90..c94b01b80 100644
--- a/ports/cpprestsdk/portfile.cmake
+++ b/ports/cpprestsdk/portfile.cmake
@@ -16,6 +16,11 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
-DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH})
endif()
+set(CPPREST_EXCLUDE_WEBSOCKETS ON)
+if("websockets" IN_LIST FEATURES)
+ set(CPPREST_EXCLUDE_WEBSOCKETS OFF)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/Release
PREFER_NINJA
@@ -23,7 +28,7 @@ vcpkg_configure_cmake(
${OPTIONS}
-DBUILD_TESTS=OFF
-DBUILD_SAMPLES=OFF
- -DCPPREST_EXCLUDE_WEBSOCKETS=OFF
+ -DCPPREST_EXCLUDE_WEBSOCKETS=${CPPREST_EXCLUDE_WEBSOCKETS}
-DCPPREST_EXPORT_DIR=share/cpprestsdk
-DWERROR=OFF
OPTIONS_DEBUG