summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2007-12-19 21:48:04 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2007-12-19 21:48:04 (GMT)
commitfffb0bd9088cb3ae3ab152562c376e2ef1461d43 (patch)
tree1d87da148777414bdf0afe4f8422b64880cb5008 /Modules/FindQt4.cmake
parent3a304f8e1b331a207766e5a0ca6c1ee6d6f7a25b (diff)
downloadCMake-fffb0bd9088cb3ae3ab152562c376e2ef1461d43.zip
CMake-fffb0bd9088cb3ae3ab152562c376e2ef1461d43.tar.gz
CMake-fffb0bd9088cb3ae3ab152562c376e2ef1461d43.tar.bz2
ENH: Better QT4_EXTRACT_OPTIONS macro.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake29
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)