vcpkg/ports/curl/0002_fix_uwp.patch

25 lines
1.1 KiB
Diff
Raw Normal View History

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 6f84919..b838245 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -162,6 +162,9 @@ if(BUILD_STATIC_LIBS)
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
endif()
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set_property(TARGET ${LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS")
+ endif()
if(CMAKEVERSION AND CMAKESONAME)
set_target_properties(${LIB_STATIC} PROPERTIES
VERSION ${CMAKEVERSION} SOVERSION ${CMAKESONAME})
@@ -197,6 +200,9 @@ if(BUILD_SHARED_LIBS)
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
endif()
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set_property(TARGET ${LIB_SHARED} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS")
+ endif()
if(CMAKEVERSION AND CMAKESONAME)
set_target_properties(${LIB_SHARED} PROPERTIES
VERSION ${CMAKEVERSION} SOVERSION ${CMAKESONAME})