Build: Also find xxHash using pkg-config

My distribution only ships the .pc file for xxHash, not the cmake file,
so try to find it that way if find_package() failed.
This commit is contained in:
Emmanuel Gil Peyrot 2024-12-28 21:47:53 +01:00
parent c65c3c7192
commit 3f987af382

View file

@ -72,7 +72,11 @@ find_package(Catch2 REQUIRED)
find_package(Tracy REQUIRED)
find_package(xxHash REQUIRED)
find_package(xxHash)
if (NOT xxHash_FOUND)
pkg_search_module(xxHash REQUIRED IMPORTED_TARGET xxHash libxxhash)
add_library(xxHash::xxhash ALIAS PkgConfig::xxHash)
endif()
find_package(Vulkan REQUIRED)