2022-06-03 19:51:49 -07:00
|
|
|
|
|
|
|
get_filename_component(_dxc_root "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
|
|
get_filename_component(_dxc_root "${_dxc_root}" PATH)
|
|
|
|
get_filename_component(_dxc_root "${_dxc_root}" PATH)
|
|
|
|
|
2023-01-09 01:24:11 -08:00
|
|
|
set(_dxc_exe "${_dxc_root}/@tool_path@")
|
2022-06-03 19:51:49 -07:00
|
|
|
if (EXISTS "${_dxc_exe}")
|
|
|
|
|
|
|
|
add_library(Microsoft::DirectXShaderCompiler SHARED IMPORTED)
|
|
|
|
set_target_properties(Microsoft::DirectXShaderCompiler PROPERTIES
|
2023-01-09 01:24:11 -08:00
|
|
|
IMPORTED_LOCATION_RELEASE "${_dxc_root}/@dll_dir@/@dll_name@"
|
|
|
|
IMPORTED_LOCATION_DEBUG "${_dxc_root}/@dll_dir@/@dll_name@"
|
|
|
|
IMPORTED_IMPLIB_RELEASE "${_dxc_root}/lib/@lib_name@"
|
|
|
|
IMPORTED_IMPLIB_DEBUG "${_dxc_root}/lib/@lib_name@"
|
|
|
|
IMPORTED_SONAME_RELEASE "@lib_name@"
|
|
|
|
IMPORTED_SONAME_DEBUG "@lib_name@"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${_dxc_root}/include/directx-dxc"
|
2022-06-03 19:51:49 -07:00
|
|
|
IMPORTED_CONFIGURATIONS "Debug;Release"
|
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
|
|
|
|
|
|
|
|
set(directx-dxc_FOUND TRUE)
|
|
|
|
set(DIRECTX_DXC_TOOL ${_dxc_exe})
|
|
|
|
|
|
|
|
else()
|
|
|
|
|
|
|
|
set(directx-dxc_FOUND FALSE)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
unset(_dxc_exe)
|
|
|
|
unset(_dxc_root)
|