<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/10 Nico Schlömer <span dir="ltr"><<a href="mailto:nico.schloemer@gmail.com" target="_blank">nico.schloemer@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
in a <a href="http://ProjectContfigTemplate.cmake.in" target="_blank">ProjectContfigTemplate.cmake.in</a> file, I'd like to have variables<br>
such as ${${PROJECT_NAME}_VERSION}. In ${}-syntax, the nesting is<br>
recognized properly, and this string would be replaced by, e.g.,<br>
"2.1".<br>
<br>
I know need to have ${}-variables in the output file, so I tried to<br>
switch to the @-syntax. </blockquote><div><br></div><div>then I guess you use configure_file(... @ONLY)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Replacing the above line by<br>
<br>
@@PROJECT_NAME@_VERSION@<br>
<br>
doesn't work however: The output file contains<br>
<br>
@Myproject_VERSION@<br>
<br>
i.e., only the inner variable was replaced.<br>
<br>
How to fix this?<br></blockquote><br></div><div class="gmail_quote">May be it's a feature not a bug.<br></div><div class="gmail_quote">(honestly I don't know but I guess the behavior has probably been here<br></div>
<div class="gmail_quote"> for ages so that people may rely on it)<br> <br></div><div class="gmail_quote">Did you try protecting the $ that needs to be with \$<br></div><div class="gmail_quote">Or<br></div><div class="gmail_quote">
set(PDOLLAR "$") and use ${PDOLLAR}<br clear="all"></div><br>-- <br>Erk<br>Le gouvernement représentatif n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a>
</div></div>