John, On Wed, Mar 18, 2009 at 12:57 PM, John Drescher <dresche...@gmail.com> wrote: >> Here is what I do for Program Files >> >> string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES}) >> >> then I use PGM_FILES and there is no complaint about bad escape sequences. >> > BTW, here is the whole section: > > IF(WIN32) > > #The following command changes \ to / in the Program Files Path so > CMake will not complain > #about bad escape sequences. > string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES}) > > SET (CMAKE_INSTALL_PREFIX ${PGM_FILES}/UPMC/${CMAKE_PROJECT_NAME} > CACHE STRING "Default Install Path" FORCE) > ENDIF(WIN32) >
.. and even if you pass in as a command line option -D"CMAKE_INSTALL_PREFIX=" ? I couldn't get FORCE to work either. Possibly because I was using INTERNAL and not STRING. It seems the following works (at least the cmake_install.cmake commands appear to get generated appropriately). FILE(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) Is there a CMPxxxx policy which deals with this which I have missed? Thanks, George. _______________________________________________ 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