mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:19:08 +08:00
parent
755760ee87
commit
712089644a
28
ports/cpprestsdk/fix-uwp.patch
Normal file
28
ports/cpprestsdk/fix-uwp.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
|
||||
index b8f3809..3857cfc 100644
|
||||
--- a/Release/CMakeLists.txt
|
||||
+++ b/Release/CMakeLists.txt
|
||||
@@ -187,7 +187,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /profile /OPT:REF /OPT:ICF")
|
||||
|
||||
if (WINDOWS_STORE OR WINDOWS_PHONE)
|
||||
- add_compile_options(/ZW)
|
||||
+ # add_compile_options(/ZW)
|
||||
else()
|
||||
if (NOT (MSVC_VERSION LESS 1920))
|
||||
add_compile_options(/permissive-)
|
||||
diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt
|
||||
index 128f6d6..098d33f 100644
|
||||
--- a/Release/src/CMakeLists.txt
|
||||
+++ b/Release/src/CMakeLists.txt
|
||||
@@ -47,6 +47,10 @@ target_include_directories(cpprest
|
||||
pch
|
||||
)
|
||||
|
||||
+if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND (WINDOWS_STORE OR WINDOWS_PHONE))
|
||||
+ target_compile_options(cpprest PUBLIC /ZW)
|
||||
+endif()
|
||||
+
|
||||
## Sub-components
|
||||
# Websockets component
|
||||
if(CPPREST_WEBSOCKETS_IMPL STREQUAL "none")
|
@ -7,6 +7,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
fix-find-openssl.patch
|
||||
fix_narrowing.patch
|
||||
fix-uwp.patch
|
||||
)
|
||||
|
||||
set(OPTIONS)
|
||||
|
23
ports/cpprestsdk/test.patch
Normal file
23
ports/cpprestsdk/test.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt
|
||||
index 098d33f..7f1f650 100644
|
||||
--- a/Release/src/CMakeLists.txt
|
||||
+++ b/Release/src/CMakeLists.txt
|
||||
@@ -218,15 +218,15 @@ if (WIN32 AND NOT WINDOWS_STORE AND NOT WINDOWS_PHONE)
|
||||
crypt32.lib
|
||||
)
|
||||
elseif(WINDOWS_STORE)
|
||||
- if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*")
|
||||
- target_compile_definitions(cpprest PRIVATE -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP)
|
||||
+
|
||||
+ target_compile_definitions(cpprest PUBLIC -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP)
|
||||
get_target_property(LINK_FLAGS cpprest LINK_FLAGS)
|
||||
if(NOT LINK_FLAGS)
|
||||
set(LINK_FLAGS "")
|
||||
endif()
|
||||
set(LINK_FLAGS "${LINK_FLAGS} /APPCONTAINER")
|
||||
set_target_properties(cpprest PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
|
||||
- endif()
|
||||
+
|
||||
endif()
|
||||
|
||||
set_target_properties(cpprest PROPERTIES OUTPUT_NAME "cpprest${CPPREST_ABI_TAG}")
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cpprestsdk",
|
||||
"version": "2.10.18",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"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."
|
||||
|
@ -15,10 +15,6 @@ vcpkg_check_features(
|
||||
messagepack USE_MSGPACK
|
||||
)
|
||||
|
||||
if("cpprestsdk" IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP)
|
||||
message(FATAL_ERROR "microsoft-signalr[cpprestsdk] is not supported on UWP, use microsoft-signalr[core] instead")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "microsoft-signalr",
|
||||
"version": "0.1.0-alpha4",
|
||||
"port-version": 7,
|
||||
"port-version": 8,
|
||||
"description": "C++ Client for ASP.NET Core SignalR.",
|
||||
"homepage": "https://github.com/aspnet/SignalR-Client-Cpp",
|
||||
"dependencies": [
|
||||
@ -16,10 +16,7 @@
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
{
|
||||
"name": "cpprestsdk",
|
||||
"platform": "!uwp"
|
||||
}
|
||||
"cpprestsdk"
|
||||
],
|
||||
"features": {
|
||||
"cpprestsdk": {
|
||||
|
@ -1850,7 +1850,7 @@
|
||||
},
|
||||
"cpprestsdk": {
|
||||
"baseline": "2.10.18",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"cppslippi": {
|
||||
"baseline": "1.1.3.14",
|
||||
@ -5358,7 +5358,7 @@
|
||||
},
|
||||
"microsoft-signalr": {
|
||||
"baseline": "0.1.0-alpha4",
|
||||
"port-version": 7
|
||||
"port-version": 8
|
||||
},
|
||||
"mikktspace": {
|
||||
"baseline": "2020-10-06",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e906f25fb64a3b11da4b1e551d63fe569fd300e3",
|
||||
"version": "2.10.18",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "53f896a9d80f0fd51e2645ee7deccbc0c955859a",
|
||||
"version": "2.10.18",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "31b63c815c4f6877e688b163a083df208d8ca133",
|
||||
"version": "0.1.0-alpha4",
|
||||
"port-version": 8
|
||||
},
|
||||
{
|
||||
"git-tree": "777629bd31d9a4885b696623304b030c29b552c4",
|
||||
"version": "0.1.0-alpha4",
|
||||
|
Loading…
Reference in New Issue
Block a user