From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 31 May 2024 18:35:16 +0000 (+0800) Subject: build: Fix detection and usage of system blake3 (#1464) X-Git-Tag: v4.11~149 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b87dadf4a771e8ab01cb180a42bd39d01608689c;p=thirdparty%2Fccache.git build: Fix detection and usage of system blake3 (#1464) --- diff --git a/cmake/FindBlake3.cmake b/cmake/FindBlake3.cmake index 501353c9..f7d2a81a 100644 --- a/cmake/FindBlake3.cmake +++ b/cmake/FindBlake3.cmake @@ -8,7 +8,7 @@ else() find_library(BLAKE3_LIBRARY blake3) if(BLAKE3_INCLUDE_DIR) file(READ "${BLAKE3_INCLUDE_DIR}/blake3.h" _blake3_h) - string(REGEX MATCH "#define _blake3_version_string \"([0-9]+).([0-9]+).*([0-9]+)\"" _ "${_blake3_h}") + string(REGEX MATCH "#define BLAKE3_VERSION_STRING \"([0-9]+).([0-9]+).*([0-9]+)\"" _ "${_blake3_h}") set(_blake3_version_string "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") if(NOT "${CMAKE_MATCH_0}" STREQUAL "" AND "${_blake3_version_string}" VERSION_GREATER_EQUAL "${Blake3_FIND_VERSION}") if(BLAKE3_LIBRARY) diff --git a/src/ccache/Hash.hpp b/src/ccache/Hash.hpp index 4ac7503f..87be969c 100644 --- a/src/ccache/Hash.hpp +++ b/src/ccache/Hash.hpp @@ -21,10 +21,11 @@ #include #include -#include #include #include +#include + #include #include #include diff --git a/src/third_party/blake3/CMakeLists.txt b/src/third_party/blake3/CMakeLists.txt index 8d0e9620..0f69337d 100644 --- a/src/third_party/blake3/CMakeLists.txt +++ b/src/third_party/blake3/CMakeLists.txt @@ -7,7 +7,7 @@ add_library( "${CMAKE_CURRENT_SOURCE_DIR}/blake3/blake3_portable.c" ) -target_include_directories(dep_blake3 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") +target_include_directories(dep_blake3 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/blake3") target_link_libraries(dep_blake3 PRIVATE standard_settings) if(MSVC)