--- cmake/modules/FindQt.cmake.orig 2013-11-25 00:05:55.000000000 +0900 +++ cmake/modules/FindQt.cmake 2013-11-25 00:07:00.000000000 +0900 @@ -72,12 +72,22 @@ ENDIF(QT_VERSION_MAJOR MATCHES 4) ENDMACRO(QT_GET_MOC_FLAGS) + + MACRO(QT_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) IF(QT_VERSION_MAJOR MATCHES 4) - QT4_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}") - ELSE(QT_VERSION_MAJOR MATCHES 4) - IF(QT_VERSION_MAJOR MATCHES 5) - QT5_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}") + IF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607) + QT4_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}" "") + ELSE(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607) + QT4_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}") + ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607) + ELSE(QT_VERSION_MAJOR MATCHES 4) + IF(QT_VERSION_MAJOR MATCHES 5) + IF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607) + QT5_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}" "") + ELSE(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607) + QT5_CREATE_MOC_COMMAND(${infile} ${outfile} "${moc_flags}" "${moc_options}") + ENDIF(CMAKE_VERSION VERSION_GREATER 2.8.11.20130607) ENDIF(QT_VERSION_MAJOR MATCHES 5) ENDIF(QT_VERSION_MAJOR MATCHES 4) ENDMACRO(QT_CREATE_MOC_COMMAND)