`target_include_directories` on line 120 for on `lib/CMakeLists.txt` would make configuration step failed when this project (clspv_core) is linked by other project.
- Dominant language
- LLVM
- Stars
- 729
- Forks
- 110
- Avg merge
- 17h 51m
- Merged PRs (30d)
- 23
Description
Line 120 of `lib/CMakeLists.txt` is as following:
```cmake
target_include_directories(${clspv_lib} PUBLIC ${CLSPV_INCLUDE_DIRS})
```
Currently, I've seen a variable `CLSPV_INCLUDE_DIRS` containing:
- Directory `include` on root directory which SHOULD be public.
- Directory prefixed on build which SHOULD be private.
This is an brief of fix in my opinion:
```cmake
# The include directory which SHOULD be public.
target_include_directories(
${clspv_lib} INTERFACE
$ # Include directory on build state
$ # include directory as installed.
)
# The include directory which SHOULD be private.
target_include_directories(
${clspv_lib} PRIVATE
${CLSPV_INCLUDE_DIRS}
)
```
Contributor guide
Assessment
This issue has not been assessed yet.