From 3f987af38248a9692e79d497d6474ac690606bc0 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 28 Dec 2024 21:47:53 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f48ad1..3c47141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)