From 610de1d72543f4e032e104ce61d8f902ecafc87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BF=8A=E5=98=89?= Date: Mon, 28 Jun 2021 08:19:28 +0000 Subject: [PATCH] CMake: couple fixes for UWP Fix a capitalization error in CMakeLists.txt Link dxgi.lib only in UWP compilation in CMakeLists.txt Bug: dawn:766 Change-Id: I011f44c8147998a9f4b3a55b25888ca1ad05a3e1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56180 Reviewed-by: Corentin Wallez Commit-Queue: Corentin Wallez --- CMakeLists.txt | 2 +- src/dawn_native/CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5c4a94a6d..1d481a0431 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ set(USE_X11 OFF) set(BUILD_EXAMPLE OFF) if (WIN32) set(ENABLE_D3D12 ON) - if (not WINDOWS_STORE) + if (NOT WINDOWS_STORE) # Enable Vulkan in win32 compilation only # since UWP only supports d3d set(ENABLE_VULKAN ON) diff --git a/src/dawn_native/CMakeLists.txt b/src/dawn_native/CMakeLists.txt index f585ccd145..8ddd395c93 100644 --- a/src/dawn_native/CMakeLists.txt +++ b/src/dawn_native/CMakeLists.txt @@ -205,7 +205,9 @@ endif() # So we only link to it in debug build when compiling for UWP. # In win32 we load dxgi.dll using LoadLibrary # so no need for static linking. -target_link_libraries(dawn_native PRIVATE debug dxgi.lib) +if (WINDOWS_STORE) + target_link_libraries(dawn_native PRIVATE debug dxgi.lib) +endif() if (DAWN_ENABLE_D3D12) target_sources(dawn_native PRIVATE