target_include_directories

Setting the include directory #

When using target_include_directories one must consider that the location of the header files differs when building the library itself; and when consumers use the installed version of the library.

The pattern is

target_include_directories(useful PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:include>
)