Skip to content

Commit

Permalink
Update CMake so UWP builds always include DirectX Tool Kit for Audio
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Apr 12, 2022
1 parent f6fe667 commit 2198052
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ set(SHADER_SOURCES
Src/Shaders/ToneMap.fx
Src/Shaders/Utilities.fxh)

if((BUILD_XAUDIO_WIN10) OR (BUILD_XAUDIO_WIN8) OR (BUILD_XAUDIO_WIN7))
if(WINDOWS_STORE OR BUILD_XAUDIO_WIN10 OR BUILD_XAUDIO_WIN8 OR BUILD_XAUDIO_WIN7)
set(LIBRARY_HEADERS ${LIBRARY_HEADERS}
Inc/Audio.h)

Expand Down Expand Up @@ -200,7 +200,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Inc>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>)

if((BUILD_XAUDIO_WIN10) OR (BUILD_XAUDIO_WIN8) OR (BUILD_XAUDIO_WIN7))
if(WINDOWS_STORE OR BUILD_XAUDIO_WIN10 OR BUILD_XAUDIO_WIN8 OR BUILD_XAUDIO_WIN7)
target_include_directories(${PROJECT_NAME} PRIVATE Src Audio)
endif()

Expand Down Expand Up @@ -356,10 +356,8 @@ if(WIN32)
target_compile_definitions(xwbtool PRIVATE _UNICODE UNICODE _WIN32_WINNT=0x0601)
endif()

if(BUILD_XAUDIO_WIN10 OR WINDOWS_STORE)
if(BUILD_XAUDIO_WIN10)
message("INFO: Using DirectX Tool Kit for Audio on XAudio 2.9 (Windows 10).")
endif()
if(WINDOWS_STORE OR BUILD_XAUDIO_WIN10)
message("INFO: Using DirectX Tool Kit for Audio on XAudio 2.9 (Windows 10/Windows 11).")
target_compile_definitions(${PROJECT_NAME} PRIVATE _WIN32_WINNT=0x0A00)
elseif(BUILD_XAUDIO_WIN8)
message("INFO: Using DirectX Tool Kit for Audio on XAudio 2.8 (Windows 8).")
Expand Down
5 changes: 1 addition & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@
"name": "UWP",
"cacheVariables": {
"CMAKE_SYSTEM_NAME": "WindowsStore",
"CMAKE_SYSTEM_VERSION": "10.0",
"BUILD_XAUDIO_WIN10": true,
"BUILD_XAUDIO_WIN8": false,
"BUILD_XAUDIO_WIN7": false
"CMAKE_SYSTEM_VERSION": "10.0"
},
"hidden": true
},
Expand Down

0 comments on commit 2198052

Please sign in to comment.