summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2009-07-16 22:53:20 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2009-07-16 22:53:20 (GMT)
commite13176e92b442a758d2ebf8d74bfd4fa02adc7cc (patch)
tree21698dcd10a74a6e14c9ffc7029acea8c98b0f21 /Modules
parent85733c17c5665df98426ab9642b2156eca8316c7 (diff)
downloadCMake-e13176e92b442a758d2ebf8d74bfd4fa02adc7cc.zip
CMake-e13176e92b442a758d2ebf8d74bfd4fa02adc7cc.tar.gz
CMake-e13176e92b442a758d2ebf8d74bfd4fa02adc7cc.tar.bz2
BUG: fix relative paths from different drives on Windows
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 1e22bb1..f97aecc 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -965,6 +965,9 @@ IF (QT4_QMAKE_FOUND)
ELSE(_infileLength GREATER _binlength)
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
ENDIF(_infileLength GREATER _binlength)
+ IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
+ STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
+ ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:")
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
STRING(REPLACE ".." "__" _outfile ${_outfile})
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)