[CMake] still issues with environment variables

Alexander Neundorf a.neundorf-work at gmx.net
Thu Mar 30 15:38:45 EST 2006


Hi,  
  
if I remember correctly, there were problems with using $ENV{PATH} in  
cmake files, since this would return windows-paths under windows, but  
cmake needs "cmake" paths.  
So now cmake cvs has FILE(SYSTEM_PATH ...), which reads the env variables 
and converts it into a cmake-style path, AFAIK also into a cmake list if 
it is a list. 
An option to convert a string which holds a platform specific path/list 
of paths into cmake style is still missing, or did I just not find it ? 
And the FIND_FOO() commands now can take 
FIND_LIBRARY(... 
PATHS 
ENV PATH 
... ) 
as argument. 
Now let's say, I want to look in $ENV{PROGRAMFILES}/gnuwin , is this 
possible with this syntax ? 
Can I put ENV PATH/gnuwin there ? 
 
I'd prefer an approach with not too many different ways to handle all 
these things (now there are three, and one is still missing). 
 
Shouldn't this work: 
STRING(TO_CMAKE cmake_var "$ENV{PATHLIST}") ? 
 
With this the special handling in the FIND_FOO() commands and the 
FILE(SYSTEM_PATH ...) wouldn't be needed I think. 
 
Bye 
Alex 
 

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


More information about the CMake mailing list