[CMake] Cmake / NSIS: escape parenthesis

ycollette.nospam at free.fr ycollette.nospam at free.fr
Fri Jan 20 02:37:34 EST 2012


Argh !

Answer to my own question:

list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS " 
       !include LogicLib.nsh
       !include x64.nsh

       \\\${If} \\\${RunningX64}
         DetailPrint 'DEBUG: Windows 64 bits: RunningX64 = ${RunningX64}'
       \\\${Else}
         DetailPrint 'DEBUG: Windows 32 bits: RunningX64 = ${RunningX64}'
       \\\${EndIf}
         ")

Best regards,

YC

----- Mail original -----
De: "ycollette nospam" <ycollette.nospam at free.fr>
À: "cmake" <cmake at cmake.org>
Envoyé: Vendredi 20 Janvier 2012 08:31:42
Objet: [CMake] Cmake / NSIS: escape parenthesis

Hello,

I would like to add the following statements in my nsis installer:

list(APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS " 
       ${If} ${RunningX64}
         DetailPrint 'DEBUG: Windows 64 bits: RunningX64 = ${RunningX64}'
       ${Else}
         DetailPrint 'DEBUG: Windows 32 bits: RunningX64 = ${RunningX64}'
       ${EndIf}
         ")

This would be written verbatim in the nsis code. But cmake interprets ${If} as "getting the value of If".
Now, in my nsis code, I've got:


         DetailPrint 'DEBUG: Windows 64 bits: RunningX64 = '

         DetailPrint 'DEBUG: Windows 32 bits: RunningX64 = '


Which is not correct.
So, my question is: how do I "protect" the { and } characters ?

Best regards,

YC
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list