[CMake] INSTALL(CODE ...)
William A. Hoffman
billlist at nycap.rr.com
Mon Aug 14 11:25:58 EDT 2006
At 10:41 AM 8/14/2006, Christian Lang wrote:
>Hello,
>
>I tried it, but it did not work either ...
>
>>Try putting the ${DATE} inside the quotes...
>>
>>Christian Lang wrote:
>>
>>>Hello,
>>>
>>>I want to add some custom install code via INSTALL(CODE <code>). How can I set variables inside such a INSTALL(CODE ...) statement? I tried something like
>>>
>>>INSTALL(CODE "
>>> SET(DATE \"today\")
>>> MESSAGE(\"Date = \" ${DATE})
>>>")
Each line of CODE is being treated as a completely separate script.
You may have to use the INSTALL(SCRIPT instead to get this working.
-Bill
More information about the CMake
mailing list