[CMake] INCLUDE_DIRECTORIES and UNIX style separated environment variables

Alexander Neundorf a.neundorf-work at gmx.net
Tue Sep 18 12:09:28 EDT 2007


On Tuesday 18 September 2007 11:35, BlinkEye wrote:
> Hi guys
>
> I'm not able to convince cmake to properly use an environment variable
> which consists of more than one entry for the INCLUDE_DIRECTORIES
> directive. It always takes the value as it is:
>
> Passing
>
> MY_SPECIAL_INCLUDE32=/foo/bar/32bit/include:/foo/bar/include
>
> to INCLUDE_DIRECTORIES like
>
> INCLUDE_DIRECTORIES( "$ENV{MY_SPECIAL_INCLUDE32}" )
>
> results in
>
> /usr/bin/c++ -I/foo/bar/32bit/include:/foo/bar/include ...
>
> instead of
>
> /usr/bin/c++ -I/foo/bar/32bit/include -I/foo/bar/include ...
>
> The same applies for LINK_DIRECTORIES but this seems not to matter for the
> rpath command.
>
> I tried to use TO_CMAKE_PATH with no avail.

This should work. Can you please post the example and the results ?

Alex


More information about the CMake mailing list