diff options
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 12 |
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) |