When performing a cmake install after building the repository, the resulting cmake config file exposes targets which do not indicate any include directories.
This is due to the use of the following command:
include_directories(BEFORE SYSTEM ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
this has two problems:
- It is directory-scope rather than target-scope
- It only regards directories visible during the build, not following installation.
Instead, we should use target_include_directories() and generator expressions to distinguish build-time and post-install directories.