On Thursday 01 August 2013, Rothbauer, Stefan wrote:
> Hello,
> 
> I set up cmake to use a external project. This 3rd party library writes out
> a file which contains all include paths set by this library. For the
> master cmake project I need to read this information at build time into a
> cmake variable to set the include directories correctly. Is there a way to
> do this?

no, that's not possible.
You can read files at build time, but if you would do this, you would be 
reading the file containing the include dirs while the makefile (or whatever) 
which is being used to build your main project and which contains the include 
dirs for your main project, is already being processed.
Do you see what I mean ?

You have to find a way to figure out the include directories needed for your 
main project at cmake time.
>From my experience with ExternalProject this is not hard, since you know where 
you are installing the external project to, and you can check (by looking 
manually at it) what include dirs it needs, and just set them.

Alternatively the issue can probably also be solved by converting your main 
project also into an ExternalProject, then its configure step will run after 
the 3rd party library has been built.

Alex
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to