[CMake] Native Pathsupport under Windows

alexander at camek.de alexander at camek.de
Tue Oct 23 09:09:49 EDT 2007


Hi,

>> I need to use under windows the buildin commands of the shell. But
>> when I run these commands they doesn't work correctly, because the
>> windows commands doen't like the slashes (/). It seems to me that
>> they want to get backslashes (\).

>> 1. Is there a possiblity to get backslashes instead of slashes as
>> paths?

> FILE(TO_NATIVE_PATH ...)

When I do a FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} RESULT)
and then use ${RESULT} I get the whole again with slashes.
So I can't use that with custom_command:
ADD_CUSTOM_COMMAND(...
COMMAND copy ${RESULT}\\image.h+${RESULT}\\test.h ${RESULT}\\image.h
VERBATIM)

Even without VERBATIM I get both times the already given error.

Greetings

Alexander


More information about the CMake mailing list