Great! That did it.
        Thank You. 

--
Artur Kedzierski

-----Original Message-----
From: Tristan Carel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 15:10
To: Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA
Cc: CMake Mailing List
Subject: Re: [CMake] FooConfig.cmake with Foo_DIR issue

On 12/19/06, Kedzierski,  Artur CIV NAVSURFWARCENDIV CORONA
<[EMAIL PROTECTED]> wrote:
>
>
>
>         Hi,
>
>         For a package Foo, I have FooConfig.cmake that contains
> .
> Foo_LIBRARIES "${Foo_DIR}/lib/@Foo_LIBRARY_NAME@"
> .
>         That works fine on Linux. However, on Windows, I get
> Foo_LIBRARIES to be something like: "c:\Program Files\Foo\/lib/foo.lib".
> Is there anyway to tell CMake to substitute Foo_DIR with a path that uses
> forward slashes? The backslashes give me an error in CMake about
> incorrect escape sequences.
>         Thank You.

Hi Artur.

You can fix the non homogeneous paths with the following commands:
FILE(TO_CMAKE_PATH path result)
FILE(TO_NATIVE_PATH path result)

all details here:
http://cmake.org/HTML/Documentation.html

Example:
SET(variable "C:\\Program Files\\Aspell/doc/html")
FILE(TO_CMAKE_PATH "${variable}" variable) # will use /

So try to put this just after the assignment of Foo_DIR:
FILE(TO_CMAKE_PATH "${Foo_DIR}" Foo_DIR)

-- 
Tristan Carel
Music with dinner is an insult both to the cook and the violinist.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to