diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-04-07 23:43:04 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-04-07 23:43:04 (GMT) |
commit | 7d85462cc346168931b8bed2154dde3e42f23671 (patch) | |
tree | 680c61192aeeea786ca4214962580f9546b964ba | |
parent | 7d2bbfe84244031c25a9c71483f71fa95b1f29e8 (diff) | |
download | CMake-7d85462cc346168931b8bed2154dde3e42f23671.zip CMake-7d85462cc346168931b8bed2154dde3e42f23671.tar.gz CMake-7d85462cc346168931b8bed2154dde3e42f23671.tar.bz2 |
BUG: Fix problem with last patch when trying to take substr of shorter strings
than expected. Fixes #6730.
-rw-r--r-- | Modules/FindQt4.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index e2f0971..3dfe1df 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -993,7 +993,11 @@ IF (QT4_QMAKE_FOUND) # macro used to create the names of output files preserving relative dirs MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile ) STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength) - STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) + STRING(LENGTH ${infile} _infileLength) + 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}") |