From 2f7728794d3964c7a4ad7cd15b14ef4b2b0db999 Mon Sep 17 00:00:00 2001 From: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Date: Thu, 7 Sep 2023 13:04:50 -0700 Subject: [PATCH] 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 --- sdk/identity/azure-identity/CMakeLists.txt | 2 +- sdk/identity/azure-identity/vcpkg/Config.cmake.in | 2 +- sdk/identity/azure-identity/vcpkg/vcpkg.json | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/identity/azure-identity/CMakeLists.txt b/sdk/identity/azure-identity/CMakeLists.txt index 740e42e19..e054973ee 100644 --- a/sdk/identity/azure-identity/CMakeLists.txt +++ b/sdk/identity/azure-identity/CMakeLists.txt @@ -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() diff --git a/sdk/identity/azure-identity/vcpkg/Config.cmake.in b/sdk/identity/azure-identity/vcpkg/Config.cmake.in index 0ce4475a6..92a29bb93 100644 --- a/sdk/identity/azure-identity/vcpkg/Config.cmake.in +++ b/sdk/identity/azure-identity/vcpkg/Config.cmake.in @@ -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) diff --git a/sdk/identity/azure-identity/vcpkg/vcpkg.json b/sdk/identity/azure-identity/vcpkg/vcpkg.json index e620dd99d..590c4a63f 100644 --- a/sdk/identity/azure-identity/vcpkg/vcpkg.json +++ b/sdk/identity/azure-identity/vcpkg/vcpkg.json @@ -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" } ] }