forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpprestsdk] fix uwp (microsoft#33768)
* [cpprestsdk] fix uwp * test
- Loading branch information
1 parent
755760e
commit 7120896
Showing
9 changed files
with
67 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ vcpkg_from_github( | |
PATCHES | ||
fix-find-openssl.patch | ||
fix_narrowing.patch | ||
fix-uwp.patch | ||
) | ||
|
||
set(OPTIONS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters