[CMake] Library include path question
cmake.org › pipermail › cmakeAnother way to achieve that is to expose library's parent directory as include interface. That's a case if all your sources, external and internal headers are stored under the library directory: get_filename_component(PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) target_include_directories(<lib-name> INTEFACE ${PARENT_DIR} )
c++ - #include parent directory's file - Stack Overflow
https://stackoverflow.com/questions/1512033028.02.2013 · When making a library that I know I will use in other projects, I tend to use boost's inclucision style: #include <libA/x.h> This means that as long as the folder above "libA" (probably /include) is there, you can reference anything and everything beneath and with "libA".It also helps avoid collisions of similary-named inclusion files when you include things boost-style, because in …