summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-06-06 05:36:39 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-06-06 05:36:39 (GMT)
commitdcdcd00ffa5e24906ff985b9fa8d3c3cc7ef8615 (patch)
tree4f81fa2c206ed7dd6302752836701432084e190a
parentd80ca5baea339bd6e7c2493645bf9e4c59d410ac (diff)
downloadCMake-dcdcd00ffa5e24906ff985b9fa8d3c3cc7ef8615.zip
CMake-dcdcd00ffa5e24906ff985b9fa8d3c3cc7ef8615.tar.gz
CMake-dcdcd00ffa5e24906ff985b9fa8d3c3cc7ef8615.tar.bz2
BUG: Fix for #7118.
Relative paths going outside the current source dir resulted in badly placed moc source files in the build dir (or out of the build dir).
-rw-r--r--Modules/FindQt4.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index abbfc72..91983ed 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1021,6 +1021,7 @@ IF (QT4_QMAKE_FOUND)
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
ENDIF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
+ STRING(REPLACE ".." "__" _outfile ${_outfile})
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
FILE(MAKE_DIRECTORY ${outpath})