mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 01:09:00 +08:00
15 lines
809 B
Plaintext
15 lines
809 B
Plaintext
The DirectX 12 Agility SDK package provides CMake targets:
|
|
|
|
find_package(directx-headers CONFIG REQUIRED)
|
|
find_package(directx12-agility CONFIG REQUIRED)
|
|
target_link_libraries(main PRIVATE Microsoft::DirectX-Headers Microsoft::DirectX-Guids Microsoft::DirectX12-Agility)
|
|
|
|
if(TARGET Microsoft::DirectX12-Agility)
|
|
file(MAKE_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/D3D12")
|
|
add_custom_command(TARGET main POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Core,IMPORTED_LOCATION_RELEASE> $<TARGET_FILE_DIR:main>/D3D12
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:Microsoft::DirectX12-Layers,IMPORTED_LOCATION_DEBUG> $<TARGET_FILE_DIR:main>/D3D12
|
|
COMMAND_EXPAND_LISTS
|
|
)
|
|
endif()
|