Hi Denis and thank you for your answer

> either: cmake -DLANG=en_US /path/to/source
The problem with this solution is that I want the variable to be set when I 
call make install and not cmake. I tried to add a target which do the cmake and 
define the variable like that : 

add_custom_target(MyInstall COMMAND "cmake -DLANG=%LANG%")
add_dependencies(install MyInstall)

but I can't add the dependency between the two targets.


> either: SET(LANG "$ENV{LANG}") somewhere
It's the same problem as above, the variable is set at cmake call, not at make 
call.

> either: "Use COMPONENT option from INSTALL command"
I will look forward into this since I don't know how it works.

Thanks !

Pierre-Julien

-----Message d'origine-----
De : Denis Scherbakov [mailto:[email protected]] 
Envoyé : vendredi 5 juin 2009 09:21
À : cmake; Pierre-Julien Villoud
Objet : Re: [CMake] Trouble with Variable in installation


> “make install
> Lang=en_US” and
> in my CMakeLists.txt : install(FILES language/$ENV{Lang}
>
> My problem is that
> the variable is replaced
> when the cmake is called so when I call “make install
> Lang=xx”, the


You may try to do something of the following 

either: "Use COMPONENT option from INSTALL command"

Denis



      
_______________________________________________
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

Reply via email to