<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
William A. Hoffman wrote:
<blockquote cite="mid6.2.3.4.2.20060814112334.0b3b9e10@pop.nycap.rr.com"
type="cite">
<pre wrap="">At 10:41 AM 8/14/2006, Christian Lang wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello,
I tried it, but it did not work either ...
</pre>
<blockquote type="cite">
<pre wrap="">Try putting the ${DATE} inside the quotes...
Christian Lang wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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})
")
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->
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.
</pre>
</blockquote>
<br>
$ symbols need to be escaped, like \$. That is the error.<br>
<br>
INSTALL(CODE ...) is flexible, but it is also cryptic. It is often a
source of actions that would be better as first-class INSTALL commands.<br>
<br>
<br>
Cheers,<br>
Brandon Van Every<br>
<br>
<br>
<br>
</body>
</html>