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 <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
陈俊嘉 2021-06-28 08:19:28 +00:00 committed by Dawn LUCI CQ
parent 3d5402c0a4
commit 610de1d725
2 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,7 @@ set(USE_X11 OFF)
set(BUILD_EXAMPLE OFF) set(BUILD_EXAMPLE OFF)
if (WIN32) if (WIN32)
set(ENABLE_D3D12 ON) set(ENABLE_D3D12 ON)
if (not WINDOWS_STORE) if (NOT WINDOWS_STORE)
# Enable Vulkan in win32 compilation only # Enable Vulkan in win32 compilation only
# since UWP only supports d3d # since UWP only supports d3d
set(ENABLE_VULKAN ON) set(ENABLE_VULKAN ON)

View File

@ -205,7 +205,9 @@ endif()
# So we only link to it in debug build when compiling for UWP. # So we only link to it in debug build when compiling for UWP.
# In win32 we load dxgi.dll using LoadLibrary # In win32 we load dxgi.dll using LoadLibrary
# so no need for static linking. # 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) if (DAWN_ENABLE_D3D12)
target_sources(dawn_native PRIVATE target_sources(dawn_native PRIVATE