[CMake] How to properly add include directories?

David Aldrich david.aldrich.ntml at gmail.com
Mon Oct 21 11:43:00 EDT 2019


>
> >What generator are you using?
>

Ninja


> That thread seems to contain a lot of misunderstandings about the issue.
>
> If you are using the Makefile generator then refer to
> https://stackoverflow.com/questions/7461000/handling-header-files-dependencies-with-cmake.
> After building the project for the first time inspect the depend.make
> files that are generated to verify if the headers are being picked up
> correctly as a dependency.
>

Thanks, I made a mistake and was touching the wrong header file. Sorry
about that. Dependencies are correctly generated and working. There seems
to be no need to add the header files to the list of sources.

BTW It seems that dependencies for header files in the same path as the
sources are generated implicitly. Is that expected?

Thanks for your help.

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191021/276d6e46/attachment.html>


More information about the CMake mailing list