[CMake] CMAKE_INSTALL_PREFIX

George Neill georgen at neillnet.com
Wed Mar 18 13:43:58 EDT 2009


Hi All,

  On windows, I pass CMAKE_INSTALL_PREFIX on the command line e.g.
"-DCMAKE_INSTALL_PREFIX=c:\some\path".  In my cmake code I use
variable which contain the suffixes  /lib, /man/man1 etc...

The install commands end up looking like this,

  C:\some\path/man/man1/some_man_file

In 2.4 this appears to work, in 2.6 it throws an error about invalid
escape sequences.

I have tried to use

FILE(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" TEMP_PREFIX)
SET(CMAKE_INSTALL_PREFIX "${TEMP_PREFIX}" CACHE INTERNAL "my prefix")

But that doesn't seem to stick, I suspect it's because I am passing it
in on the command line.

What is the best way to deal with this?

TIA,
George


More information about the CMake mailing list