About a year ago I asked about header dependencies in CMake.

I realized recently that the issue seemed to be that CMake considered those header files to be external to the project. At least, when generating a Code::Blocks project the header files do not appear within the project (the source files do). It therefore seems to me that CMake consider those headers to be external to the project, and does not track them in the depends.

A quick search in the CMake tutorial only pointed to include_directories which does not seem to do what I wish…

What is the proper way to signal to CMake that a particular directory contains headers to be included, and that those headers should be tracked by the generated Makefile?

10 Answers
10

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *