Browse Source

cpack wix: fix path error on cygwin

Under Cygwin, file(TO_CMAKE_PATH...) outputs invalid paths when given
a Windows path as input (the colon after the drive letter gets replaced
by a semicolon).

As a workaround, just use a string replace to change the slashes instead.
Stephen Sorley 8 years ago
parent
commit
e258fe0396
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/CPackWIX.cmake

+ 1 - 1
Modules/CPackWIX.cmake

@@ -289,7 +289,7 @@
 #
 #
 
 
 if(NOT CPACK_WIX_ROOT)
 if(NOT CPACK_WIX_ROOT)
-  file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
+  string(REPLACE "\\" "/" CPACK_WIX_ROOT "$ENV{WIX}")
 endif()
 endif()
 
 
 find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
 find_program(CPACK_WIX_CANDLE_EXECUTABLE candle