[CMake] CMAKE_INSTALL_PREFIX
John Drescher
drescherjm at gmail.com
Wed Mar 18 13:55:18 EDT 2009
On Wed, Mar 18, 2009 at 1:43 PM, George Neill <georgen at neillnet.com> wrote:
> 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?
>
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.
John
More information about the CMake
mailing list