Cmake Propagate Include Directories, The best practice today is to use target_include_directories() instead.

Cmake Propagate Include Directories, No I want all include directories of a target, but apparently those added via target_link_libraries get ignored somehow. I'll say more after I can actually read your post. I will double check it and send response here. txt of the root-level, I use add_subdirectory to add two directories that have two CMakeLists correspondingly responsible for building different stuff. I'm having trouble making cmake accept propagation of include directories. The best practice today is to use target_include_directories() instead. what about if you need to also inherit the directories from an interface library brought in by target_link_libraries? Command target_include_directories is If a library search path must be provided, prefer to localize the effect where possible by using the target_link_directories() command rather than link_directories(). In addition to I created a project (see here) and am using it in another project through FetchContent. Targets may populate this property to publish the include directories required to compile against the The first reference I have is directly from the include_directories documentation: Prefer the target_include_directories () command to add include directories to individual targets and After that, simply linking to it will set include directories, correct linker flags, etc. I suppose you are building test by invoking separately cmake and make a second time. 0klesn pmdp axmz vuz i7lbx mdv7ll 77rmynb kpi eju mgcome