CMake file system use the front-slash '/' as the path seperator, but under Windows systems, this can cause problems(we all know that Windows use the back-slash '\' as the path seperator), especially in command line.
CMake has provided us the command FILE(TO_NATIVE_PATH) to convert CMake path into the native system path, and FILE(TO_CMAKE_PATH), vice versa. The example is:
CMake has provided us the command FILE(TO_NATIVE_PATH) to convert CMake path into the native system path, and FILE(TO_CMAKE_PATH), vice versa. The example is:
# Convert CMake path into native path
FILE(TO_NATIVE_PATH ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} NATIVE_OUTPUT_PATH)
MESSAGE(STATUS "This is the native output path=" ${NATIVE_OUTPUT_PATH})