From 395abbd8a8b1dcbaf568ffcf9521d2511d40d549 Mon Sep 17 00:00:00 2001 From: clinton Date: Fri, 6 Jun 2008 05:36:39 +0000 Subject: [PATCH] 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). --- Modules/FindQt4.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index abbfc7287..91983eda8 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}) -- 2.11.4.GIT