[CMake] INCLUDE_DIRECTORIES and FIND_PATH

George Neill georgen at neillnet.com
Wed Mar 19 15:18:53 EDT 2008


Hi CMakers!

I am using, cmake version 2.4-patch 6 on linux.

This example using INCLUDE_DIRECTORIES doesn't appear to be inherited
by project sub directories.

FIND_PATH(GN
  NAMES "include"
  PATHS "/tmp"
)

INCLUDE_DIRECTORIES(
  "${GN}/child"
)

If I change it to this,

INCLUDE_DIRECTORIES(
  "/tmp/include/child"
)

or cache the GN variable;  it appears to work the way I had expected.

Is this by design?  Or a bug?

Thanks,
George.


More information about the CMake mailing list