Better cmake UWP detection condition (use the same definition as vcpkg) (#4932)

* Better cmake UWP detection condition (use the same definition as vcpkg)

* Update Config.cmake.in

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2023-09-07 13:04:50 -07:00 committed by GitHub
parent 93a0942c6a
commit 2f7728794d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -101,7 +101,7 @@ target_include_directories(
target_link_libraries(azure-identity PUBLIC Azure::azure-core)
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(WIN32 AND NOT(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_SYSTEM_VERSION STREQUAL "10.0"))
find_package(wil CONFIG REQUIRED)
target_link_libraries(azure-identity PRIVATE WIL::WIL bcrypt crypt32)
else()

View File

@ -6,7 +6,7 @@
include(CMakeFindDependencyMacro)
find_dependency(azure-core-cpp)
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
if(WIN32 AND NOT (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_SYSTEM_VERSION STREQUAL "10.0"))
find_dependency(wil)
else()
find_dependency(OpenSSL)

View File

@ -20,10 +20,6 @@
"name": "openssl",
"platform": "!windows & !uwp"
},
{
"name": "wil",
"platform": "windows & !uwp"
},
{
"name": "vcpkg-cmake",
"host": true
@ -31,6 +27,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "wil",
"platform": "windows & !uwp"
}
]
}