diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt index a06623bf20..bc1d612ec9 100644 --- a/Release/CMakeLists.txt +++ b/Release/CMakeLists.txt @@ -69,7 +69,7 @@ elseif(UNIX AND NOT APPLE) # Note: also android set(CPPREST_HTTP_CLIENT_IMPL asio CACHE STRING "Internal use.") set(CPPREST_HTTP_LISTENER_IMPL asio CACHE STRING "Internal use.") elseif(WINDOWS_PHONE OR WINDOWS_STORE) - set(CPPREST_PPLX_IMPL win CACHE STRING "Internal use.") + set(CPPREST_PPLX_IMPL winrt CACHE STRING "Internal use.") set(CPPREST_WEBSOCKETS_IMPL winrt CACHE STRING "Internal use.") set(CPPREST_FILEIO_IMPL winrt CACHE STRING "Internal use.") set(CPPREST_HTTP_CLIENT_IMPL winrt CACHE STRING "Internal use.") @@ -115,7 +115,12 @@ elseif(ANDROID) ) elseif(UNIX) # This includes OSX elseif(WIN32) - add_definitions(-DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0600 -DWIN32 -D_SCL_SECURE_NO_WARNINGS) + add_definitions(-DUNICODE -D_UNICODE -DWIN32 -D_SCL_SECURE_NO_WARNINGS) + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_definitions(-D_WIN32_WINNT=0x0A00) + else() + add_definitions(-D_WIN32_WINNT=0x0600) + endif() if(NOT BUILD_SHARED_LIBS) # This causes cmake to not link the test libraries separately, but instead hold onto their object files. diff --git a/Release/src/CMakeLists.txt b/Release/src/CMakeLists.txt index 1c460684ab..070ab41c01 100644 --- a/Release/src/CMakeLists.txt +++ b/Release/src/CMakeLists.txt @@ -80,6 +80,11 @@ elseif(CPPREST_PPLX_IMPL STREQUAL "winpplx") pplx/threadpool.cpp pplx/pplxwin.cpp ) +elseif(CPPREST_PPLX_IMPL STREQUAL "winrt") + list(APPEND SOURCES + pplx/pplxwin.cpp + ) + list(FILTER HEADERS_PPLX EXCLUDE REGEX "threadpool\\.h") endif() # Http client component @@ -186,6 +191,7 @@ if(CPPREST_PPLX_IMPL STREQUAL "apple") target_link_libraries(cpprest PRIVATE ${COREFOUNDATION} ${SECURITY}) elseif(CPPREST_PPLX_IMPL STREQUAL "linux") elseif(CPPREST_PPLX_IMPL STREQUAL "win") +elseif(CPPREST_PPLX_IMPL STREQUAL "winrt") elseif(CPPREST_PPLX_IMPL STREQUAL "winpplx") target_compile_definitions(cpprest PUBLIC -DCPPREST_FORCE_PPLX=1) else()