summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-11-05 22:56:55 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-11-05 22:56:55 (GMT)
commite8e4160cce0d50172d08d8a108dcf236c19703cd (patch)
treeb2f3321ba124fc9b97550d055a3d80b8403c88d8
parent19046aa98c863c8ed2e957f0ddd404b60577be85 (diff)
downloadCMake-e8e4160cce0d50172d08d8a108dcf236c19703cd.zip
CMake-e8e4160cce0d50172d08d8a108dcf236c19703cd.tar.gz
CMake-e8e4160cce0d50172d08d8a108dcf236c19703cd.tar.bz2
BUG: Fix #7969. Fix moc output files if source dir contains regex characters.
-rw-r--r--Modules/FindQt4.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 3ed13a6..10b8a03 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -855,12 +855,14 @@ IF (QT4_QMAKE_FOUND)
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
IF(_infileLength GREATER _binlength)
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
- ENDIF(_infileLength GREATER _binlength)
- IF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
- ELSE(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
+ IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
+ ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ ELSE(_infileLength GREATER _binlength)
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}")
+ ENDIF(_infileLength GREATER _binlength)
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
STRING(REPLACE ".." "__" _outfile ${_outfile})
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)