Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.78
diff -b -u -p -r1.78 FindQt4.cmake
--- FindQt4.cmake	14 Nov 2007 23:08:16 -0000	1.78
+++ FindQt4.cmake	24 Nov 2007 22:16:05 -0000
@@ -864,14 +864,28 @@ IF (QT4_QMAKE_FOUND)
     # get include dirs
     QT4_GET_MOC_INC_DIRS(moc_includes)
 
-    FOREACH (it ${ARGN})
+    SET(_moc_sources ${ARGN})
+    SET(_moc_options)
+    LIST(FIND _moc_sources OPTIONS _index)
+    IF(NOT _index EQUAL -1)
+      LIST(REMOVE_ITEM _moc_sources OPTIONS)
+      LIST(LENGTH _moc_sources _length)
+      WHILE(_length GREATER ${_index})
+        LIST(GET _moc_sources ${_index} _opt_value)
+        LIST(REMOVE_AT _moc_sources ${_index})
+        LIST(APPEND _moc_options ${_opt_value})
+        LIST(LENGTH _moc_sources _length)
+      ENDWHILE(_length GREATER ${_index})
+    ENDIF(NOT _index EQUAL -1)
+    
+    FOREACH (it ${_moc_sources})
       GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
       GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
 
       SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/moc_${outfile}.cxx)
       ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
         COMMAND ${QT_MOC_EXECUTABLE}
-        ARGS ${moc_includes} -o ${outfile} ${it}
+        ARGS ${moc_includes} ${_moc_options} -o ${outfile} ${it}
         DEPENDS ${it})
       SET(${outfiles} ${${outfiles}} ${outfile})
     ENDFOREACH(it)
