diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/directx12-agility/directx12-config.cmake.in | |
Diffstat (limited to 'vcpkg/ports/directx12-agility/directx12-config.cmake.in')
| -rw-r--r-- | vcpkg/ports/directx12-agility/directx12-config.cmake.in | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/vcpkg/ports/directx12-agility/directx12-config.cmake.in b/vcpkg/ports/directx12-agility/directx12-config.cmake.in new file mode 100644 index 0000000..413d2f0 --- /dev/null +++ b/vcpkg/ports/directx12-agility/directx12-config.cmake.in @@ -0,0 +1,41 @@ +get_filename_component(_dx12_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_dx12_root "${_dx12_root}" PATH) +get_filename_component(_dx12_root "${_dx12_root}" PATH) + +if (EXISTS "${_dx12_root}/bin/D3D12Core.dll") + + find_library(D3D12_LIB NAMES d3d12) + + if("${D3D12_LIB}" STREQUAL "D3D12_LIB-NOTFOUND") + message(FATAL_ERROR "D3D12.LIB import library from the Windows SDK is required") + endif() + + add_library(Microsoft::DirectX12-Core SHARED IMPORTED) + set_target_properties(Microsoft::DirectX12-Core PROPERTIES + IMPORTED_LOCATION_RELEASE "${_dx12_root}/bin/D3D12Core.dll" + IMPORTED_LOCATION_DEBUG "${_dx12_root}/debug/bin/D3D12Core.dll" + IMPORTED_IMPLIB "${D3D12_LIB}" + IMPORTED_CONFIGURATIONS "Debug;Release" + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + + add_library(Microsoft::DirectX12-Layers SHARED IMPORTED) + set_target_properties(Microsoft::DirectX12-Layers PROPERTIES + IMPORTED_LOCATION_RELEASE "${_dx12_root}/debug/bin/d3d12SDKLayers.dll" + IMPORTED_LOCATION_DEBUG "${_dx12_root}/debug/bin/d3d12SDKLayers.dll" + IMPORTED_IMPLIB "${D3D12_LIB}" + IMPORTED_CONFIGURATIONS "Debug;Release" + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + + add_library(Microsoft::DirectX12-Agility INTERFACE IMPORTED) + set_target_properties(Microsoft::DirectX12-Agility PROPERTIES + INTERFACE_LINK_LIBRARIES "Microsoft::DirectX12-Core;Microsoft::DirectX12-Layers") + + set(directx12-agility_FOUND TRUE) + +else() + + set(directx12-agility_FOUND FALSE) + +endif() + +unset(_dx12_root) |