[CMake] Trouble with Variable in installation

Alexander Neundorf a.neundorf-work at gmx.net
Wed Jun 17 16:59:16 EDT 2009


On Friday 05 June 2009, Pierre-Julien Villoud wrote:
> Hi everyone,
>
> I'd like to do the following for my install target :
>
> "make install Lang=en_US" and in my CMakeLists.txt : install(FILES
> language/$ENV{Lang} ...) so that at each call of make install with a

Did you try escaping the $ ?
I.e. install(FILES language/\$ENV{Lang} ...)

This way the $ENV{..} is evaluated at cmake time, but simply written into the 
cmake_install.cmake.
Seems to work here.

Alex


More information about the CMake mailing list