From 5528cfee1721636e8e06c77ec7d0f0379f73a210 Mon Sep 17 00:00:00 2001 From: kilo52 Date: Wed, 3 Sep 2025 21:22:15 +0200 Subject: [PATCH] build(cmake): change include directory scope to public When a project adds tree-sitter as a dependency via the CMake FetchContent machinery, the project fails to build because the tree-sitter header cannot be found. This is because the include directory is specified with the private scope instead of public. --- lib/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 29c38d39..ed822584 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -19,7 +19,7 @@ endif() add_library(tree-sitter ${TS_SOURCE_FILES}) -target_include_directories(tree-sitter PRIVATE src src/wasm include) +target_include_directories(tree-sitter PRIVATE src src/wasm PUBLIC include) if(MSVC) target_compile_options(tree-sitter PRIVATE