rpcsx/cmake/FindSPIRV-Tools-opt.cmake
Alexandre Bouvier 7e78907829
Some checks failed
Formatting check / formatting-check (push) Failing after 0s
Build RPCSX / build-rpcsx (push) Failing after 0s
cmake: try system libraries first (#71)
2024-09-14 14:45:07 +03:00

18 lines
531 B
CMake

include(CheckCXXSymbolExists)
include(FindPackageHandleStandardArgs)
set(CMAKE_REQUIRED_LIBRARIES SPIRV-Tools-opt)
check_cxx_symbol_exists(spvtools::CreateBitCastCombinePass
"spirv-tools/optimizer.hpp"
HAVE_CREATE_BIT_CAST_COMBINE_PASS
)
if(HAVE_CREATE_BIT_CAST_COMBINE_PASS)
find_package(SPIRV-Tools-opt QUIET CONFIG)
find_package_handle_standard_args(SPIRV-Tools-opt CONFIG_MODE)
else()
find_package_handle_standard_args(SPIRV-Tools-opt
REQUIRED_VARS HAVE_CREATE_BIT_CAST_COMBINE_PASS
)
endif()