On Sat, Apr 11, 2009 at 12:17 AM, Adrian Boeing <[email protected]> wrote:

> Great, thanks Philip! It would be fantastic if CMake included this
> feature in future.
>
> Just for clarification to make sure I haven't misunderstood, the
> solution Alex proposed would not do what I wanted (separate includes)
> because both files are in the same directory? What Alex is suggesting
> would work if I moved the files into separate directories?


include_directories() is additive as you recurse into new subdirectories
with add_subdirectory().

include
   my include files are here...
src
   include_directories(../include)
src/foo
   include_directories(${FOO_INCLUDE_DIRS})
src/bar

In the example above, src, src/foo, and src/bar will all have include in
their include path.
Only src/foo will have the contents of FOO_INCLUDE_DIRS in it's directory.

Does that answer your question?

-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to