[CMake] multiple directories in one variable

David Cole david.cole at kitware.com
Fri Feb 11 10:37:54 EST 2011


On Fri, Feb 11, 2011 at 10:29 AM, John Drescher <drescherjm at gmail.com>wrote:

> > it is what I want.
> > But how?
> >
> > How can I "put all the directories in EXTERNAL_PRODUCT_INCLUDES" from
> cmake command line?
> >
>
> I do not know. Sorry. I did not see that you were trying to add these
> via the command line. I never use that mode of cmake.
>
> John
> _______________________________________________
> 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
>


You should be able to do:

    cmake "-DEXTERNAL_PRODUCT_INCLUDES=/dir a;/dir b;/dirc/include"
../source_directory

And then, inside CMakeLists.txt:

    include_directories(${EXTERNAL_PRODUCT_INCLUDES})


Is there a problem you hit with that approach?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110211/bfd39542/attachment.htm>


More information about the CMake mailing list