Skip to content

Commit

Permalink
CMake: updated detection of the Windows SDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 20, 2023
1 parent 813864e commit 8927e18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ message("CMake generator: " ${CMAKE_GENERATOR})
if(WIN32)
if(${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
set(PLATFORM_UNIVERSAL_WINDOWS TRUE CACHE INTERNAL "Target platform: Windows Store")
message("Target platform: Universal Windows " ${ARCH} ". SDK Version: " ${CMAKE_SYSTEM_VERSION})
message("Target platform: Universal Windows " ${ARCH} ". SDK Version: " ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
else()
set(PLATFORM_WIN32 TRUE CACHE INTERNAL "Target platform: Win32") #WIN32 is a variable, so we cannot use string "WIN32"
message("Target platform: Win32 " ${ARCH} ". SDK Version: " ${CMAKE_SYSTEM_VERSION})
message("Target platform: Win32 " ${ARCH} ". SDK Version: " ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
endif()
else()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
Expand Down Expand Up @@ -144,7 +144,7 @@ add_library(Diligent-PublicBuildSettings INTERFACE)
if(PLATFORM_WIN32)
if(MSVC)
set(D3D11_SUPPORTED TRUE CACHE INTERNAL "D3D11 is supported on Win32 platform")
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL "10.0")
if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_GREATER_EQUAL "10.0")
set(D3D12_SUPPORTED TRUE CACHE INTERNAL "D3D12 is supported on Win32 platform")
endif()
else()
Expand All @@ -160,7 +160,7 @@ if(PLATFORM_WIN32)
target_compile_definitions(Diligent-PublicBuildSettings INTERFACE PLATFORM_WIN32=1)
elseif(PLATFORM_UNIVERSAL_WINDOWS)
set(D3D11_SUPPORTED TRUE CACHE INTERNAL "D3D11 is supported on Universal Windows platform")
if(CMAKE_SYSTEM_VERSION VERSION_GREATER_EQUAL "10.0")
if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION VERSION_GREATER_EQUAL "10.0")
set(D3D12_SUPPORTED TRUE CACHE INTERNAL "D3D12 is supported on Universal Windows platform")
endif()
set(ARCHIVER_SUPPORTED TRUE CACHE INTERNAL "Archiver is supported on Universal Windows platform")
Expand Down

0 comments on commit 8927e18

Please sign in to comment.