BUG: Fix #7969. Fix moc output files if source dir contains regex characters.
This commit is contained in:
parent
19046aa98c
commit
e8e4160cce
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue