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.
This commit is contained in:
kilo52 2025-09-03 21:22:15 +02:00 committed by Amaan Qureshi
parent 937dcf5fd1
commit 5528cfee17

View file

@ -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