Skip to content

Commit 3c1badf

Browse files
authored
Enable D3D12 Agility SDK in plume submodule. (#1646)
1 parent 9ace79a commit 3c1badf

File tree

4 files changed

+13
-22
lines changed

4 files changed

+13
-22
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ if (APPLE)
2323
enable_language(OBJC OBJCXX)
2424
endif()
2525

26-
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
27-
set(SDL_VULKAN_ENABLED ON CACHE BOOL "")
28-
endif()
29-
3026
if (CMAKE_OSX_ARCHITECTURES)
3127
set(UNLEASHED_RECOMP_ARCHITECTURE ${CMAKE_OSX_ARCHITECTURES})
3228
elseif(CMAKE_SYSTEM_PROCESSOR)

UnleashedRecomp/CMakeLists.txt

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -352,23 +352,13 @@ if (UNLEASHED_RECOMP_FLATPAK)
352352
)
353353
endif()
354354

355+
find_package(CURL REQUIRED)
356+
355357
if (UNLEASHED_RECOMP_D3D12)
356358
find_package(directx-headers CONFIG REQUIRED)
357359
find_package(directx12-agility CONFIG REQUIRED)
358-
target_compile_definitions(UnleashedRecomp PRIVATE
359-
UNLEASHED_RECOMP_D3D12
360-
D3D12MA_USING_DIRECTX_HEADERS
361-
D3D12MA_OPTIONS16_SUPPORTED
362-
)
363-
endif()
360+
target_compile_definitions(UnleashedRecomp PRIVATE UNLEASHED_RECOMP_D3D12)
364361

365-
if (SDL_VULKAN_ENABLED)
366-
target_compile_definitions(UnleashedRecomp PRIVATE SDL_VULKAN_ENABLED)
367-
endif()
368-
369-
find_package(CURL REQUIRED)
370-
371-
if (UNLEASHED_RECOMP_D3D12)
372362
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/D3D12)
373363
add_custom_command(TARGET UnleashedRecomp POST_BUILD
374364
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> $<TARGET_FILE_DIR:UnleashedRecomp>/D3D12
@@ -379,9 +369,6 @@ if (UNLEASHED_RECOMP_D3D12)
379369
)
380370

381371
target_link_libraries(UnleashedRecomp PRIVATE
382-
Microsoft::DirectX-Headers
383-
Microsoft::DirectX-Guids
384-
Microsoft::DirectX12-Agility
385372
Microsoft::DirectXShaderCompiler
386373
Microsoft::DXIL
387374
dxgi
@@ -395,7 +382,7 @@ if (WIN32)
395382
ntdll
396383
Shcore
397384
Synchronization
398-
winmm
385+
winmm
399386
windowsapp
400387
)
401388
endif()

thirdparty/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ set(SDL2MIXER_OPUS OFF)
1515
set(SDL2MIXER_VORBIS "VORBISFILE")
1616
set(SDL2MIXER_WAVPACK OFF)
1717

18+
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
19+
set(SDL_VULKAN_ENABLED ON CACHE BOOL "")
20+
endif()
21+
22+
if (WIN32)
23+
set(D3D12_AGILITY_SDK_ENABLED ON CACHE BOOL "")
24+
endif()
25+
1826
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/msdf-atlas-gen")
1927
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/nativefiledialog-extended")
2028
add_subdirectory("${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/o1heap")

0 commit comments

Comments
 (0)