[CMake] multiple directories in one variable

Ilja Golshtein ilejncs at narod.ru
Fri Feb 11 09:34:03 EST 2011


John,

it is what I want.
But how?

How can I "put all the directories in EXTERNAL_PRODUCT_INCLUDES" from cmake command line?

Thanks.


11.02.2011, 17:24, "John Drescher" <drescherjm at gmail.com>:
> On Fri, Feb 11, 2011 at 9:16 AM, Ilja Golshtein <ilejncs at narod.ru>; wrote:
>
>>  Hello!
>>
>>  I use a product which (depending on installation type) can keep headers in several directories.
>>
>>  What is the best way to specify these directories?
>>
>>  Do I have better option than variables EXTERNAL_PRODUCT_INCLUDE_1 EXTERNAL_PRODUCT_INCLUDE_2 ...
>>  listed as
>>  include_directories(EXTERNAL_PRODUCT_INCLUDE_1 EXTERNAL_PRODUCT_INCLUDE_2) ?
>>
>>  Ideally I want to write -DEXTERNAL_PRODUCT_INCLUDE="dir1 dir2 dir3" cmake-time, but it does not work.
>
> I would do
>
> include_directories(EXTERNAL_PRODUCT_INCLUDES)
>
> and put all the directories in EXTERNAL_PRODUCT_INCLUDES
>
> John

-- 
Best regards,
Ilja Golshtein.


More information about the CMake mailing list