I've got the following code in my top-level CMakeLists.txt file:

IF (WIN32)
    SET(CMAKE_INSTALL_PREFIX
"$ENV{ProgramFiles}\${PROJECT_NAME}_${VERSION}")
    SET(CPACK_GENERATOR "ZIP")
ELSE(WIN32)
    SET(CMAKE_INSTALL_PREFIX "/opt/${PROJECT_NAME}_${VERSION}")
    SET(CPACK_GENERATOR "RPM")
ENDIF(WIN32)

Regardless of how I try to construct the Win32 CMAKE_INSTALL_PREFIX, I get
some kind of quoting-related
problem e,g:

CMake Error: Invalid escape sequence \P
Syntax error in cmake code at
C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CPack.cmake:788:
syntax error, unexpected cal_ERROR, expecting $end (4), when parsing string
"C:\Program Files\MDP_1.0.0"

with variants, depending on presence/absence of quotes and number of \

Can someone put me out of my misery and tell me what I need to do to get
this right ?

Steve Collyer
_______________________________________________
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

Reply via email to