fix weaseljson public header include path
CI / pre-commit (pull_request) Successful in 56s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-arm64, ubuntu-latest-arm64) (pull_request) Successful in 2m25s
CI / build (-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, clang-amd64, ubuntu-latest-amd64) (pull_request) Successful in 2m52s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-arm64, ubuntu-latest-arm64) (pull_request) Successful in 2m45s
CI / build (-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++, gcc-amd64, ubuntu-latest-amd64) (pull_request) Successful in 3m7s

weaseljson installs its public header as

  ${prefix}/include/weaseljson/weaseljson.h

and exports INTERFACE_INCLUDE_DIRECTORIES as

  ${prefix}/include/weaseljson

so consumers must include the header as <weaseljson.h>. The previous
weaseldb code used <weaseljson/weaseljson.h>, which only worked when a
system copy of weaseljson happened to be reachable via the compiler's
default include search path (e.g. /usr/include). In CI, where weaseljson
is built and installed to a non-system prefix, the build failed with:

  fatal error: 'weaseljson/weaseljson.h' file not found

Use the include path advertised by the weaseljson CMake target.
This commit is contained in:
2026-06-30 16:15:18 -04:00
parent 7ffecdda7d
commit ac491c2174
+1 -1
View File
@@ -3,7 +3,7 @@
#include <memory>
#include <simdutf.h>
#include <weaseljson/weaseljson.h>
#include <weaseljson.h>
#include "commit_request_parser.hpp"
#include "json_token_enum.hpp"