Petr Kmoch wrote: > On Thu, Jun 18, 2015 at 1:43 AM, Robert Dailey > <rcdailey.li...@gmail.com> wrote: > >> On Wed, Jun 17, 2015 at 4:31 PM, Dan Liew >> <d...@su-root.co.uk> wrote: >> > On 17 June 2015 at 12:28, Robert Dailey >> > <rcdailey.li...@gmail.com> >> wrote: >> >> Is there a way to only take (recursively) the include directiories >> >> from a target or set of targets? I know that include directories >> >> propagate when passing targets to target_link_libraries(), but I do >> >> not want to link the libs; I only want the include directories. >> >> >> >> How can I do this? Thanks. >> > > I haven't tested this, but it should be possible to drag in the interface > properties explicitly with generator expressions. Something like this: > > add_executable(Depender ...) > target_include_directories(Depender PRIVATE > $<TARGET_PROPERTY:Dependee1,INTERFACE_INCLUDE_DIRECTORIES> > $<TARGET_PROPERTY:Dependee2,INTERFACE_INCLUDE_DIRECTORIES> > ) > > dtto for other INTERFACE_... properties you might need.
He seems to want INCLUDE_DIRECTORIES, not INTERFACE_INCLUDE_DIRECTORIES as he's compiling a file from the target. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake