diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 9a6d9ce..500c6ed 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -848,20 +848,21 @@ IF (QT4_QMAKE_FOUND) # ###################################### - MACRO (QT4_EXTRACT_OPTIONS qt4_files qt4_options) - SET(${qt4_files} ${ARGN}) - SET(${qt4_options}) - LIST(FIND ${qt4_files} OPTIONS _index) - IF(NOT _index EQUAL -1) - LIST(REMOVE_ITEM ${qt4_files} OPTIONS) - LIST(LENGTH ${qt4_files} _length) - WHILE(_length GREATER ${_index}) - LIST(GET ${qt4_files} ${_index} _opt_value) - LIST(REMOVE_AT ${qt4_files} ${_index}) - LIST(APPEND ${qt4_options} ${_opt_value}) - LIST(LENGTH ${qt4_files} _length) - ENDWHILE(_length GREATER ${_index}) - ENDIF(NOT _index EQUAL -1) + MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) + SET(${_qt4_files}) + SET(${_qt4_options}) + SET(_QT4_DOING_OPTIONS FALSE) + FOREACH(_currentArg ${ARGN}) + IF ("${_currentArg}" STREQUAL "OPTIONS") + SET(_QT4_DOING_OPTIONS TRUE) + ELSE ("${_currentArg}" STREQUAL "OPTIONS") + IF(_QT4_DOING_OPTIONS) + LIST(APPEND ${_qt4_options} "${_currentArg}") + ELSE(_QT4_DOING_OPTIONS) + LIST(APPEND ${_qt4_files} "${_currentArg}") + ENDIF(_QT4_DOING_OPTIONS) + ENDIF ("${_currentArg}" STREQUAL "OPTIONS") + ENDFOREACH(_currentArg) ENDMACRO (QT4_EXTRACT_OPTIONS) MACRO (QT4_GET_MOC_INC_DIRS _moc_INC_DIRS) |