[CMake] WRITE_FILE and special char

Xavier Larrode Xavier.Larrode at irisa.fr
Wed Nov 8 10:31:05 EST 2006


OK perfect
Tristan Carel a écrit :
> On 11/8/06, Xavier Larrode <Xavier.Larrode at irisa.fr> wrote:
>> Hi all
>> How can i write special character like ${} with WRITE_FILE
>>
>> ex : Libs:  -L${libdir} -lcairo
>> and libdir is not a cmake variable...
>
> WRITE_FILE(${PROJECT_SOURCE_DIR}/foo.txt "Libs:  -L\${libdir} -lcairo")
>
> Note the \ character before $ to tell CMake we want the character so
> that it prevents the variable expansion.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xavier.Larrode.vcf
Type: text/x-vcard
Size: 169 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20061108/7ecafc2a/Xavier.Larrode.vcf


More information about the CMake mailing list