[CMake] Trouble with Variable in installation
Pierre-Julien Villoud
PVilloud at movea.com
Fri Jun 5 03:31:51 EDT 2009
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:denis_scherbakov at yahoo.com]
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
More information about the CMake
mailing list