From Kristofer Tingdahl, "the syntax of the moc executable has changed between 5.1.1 and 5.2.0 versions of qt (see below). The difference is that the <file> argument has become mandatory after the -f option.

Hence, moc will complain when osg throws in a -f without anything after it. Hence I propose removing the -f on Qt5 builds. I have tested building without -f on both qt520 and qt511, and that works well.

The attached src/osgQt/CMakeLists.txt that can be patched into 3.2 safely. For the trunk, I would consider dropping the check on the version, and simply remove the option on qt5. I have tested that on qt5.1.1, and that worked fine. Question is however if it works on qt5.0. Probably it does, so the question is simplicity of CMakeList.txt vs safety."
This commit is contained in:
Robert Osfield 2013-12-19 17:13:24 +00:00
parent e4810990f0
commit a72508bc71

View File

@ -13,7 +13,11 @@ SET(SOURCES_H
) )
IF ( Qt5Widgets_FOUND ) IF ( Qt5Widgets_FOUND )
if (Qt5Widgets_VERSION VERSION_LESS 5.2.0)
QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" ) QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
else()
QT5_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} )
endif()
ELSE() ELSE()
QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" ) QT4_WRAP_CPP( SOURCES_H_MOC ${SOURCES_H} OPTIONS "-f" )
ENDIF() ENDIF()