diff --git a/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch b/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch new file mode 100644 index 0000000000..ab54baf01a --- /dev/null +++ b/ports/cpprestsdk/0002_no_websocketpp_in_uwp.patch @@ -0,0 +1,13 @@ +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 diff --git a/ports/cpprestsdk/portfile.cmake b/ports/cpprestsdk/portfile.cmake index f92c5147a0..2d23bf632b 100644 --- a/ports/cpprestsdk/portfile.cmake +++ b/ports/cpprestsdk/portfile.cmake @@ -13,15 +13,21 @@ 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 ) -SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp") +set(OPTIONS) +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp") + list(APPEND OPTIONS + -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH} + -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}) +endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/Release OPTIONS - -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH} - -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH} + ${OPTIONS} -DBUILD_TESTS=OFF -DBUILD_SAMPLES=OFF -DCPPREST_EXCLUDE_WEBSOCKETS=OFF