From: <and...@us...> - 2014-03-15 00:29:03
|
Revision: 13058 http://sourceforge.net/p/plplot/code/13058 Author: andrewross Date: 2014-03-15 00:28:58 +0000 (Sat, 15 Mar 2014) Log Message: ----------- Update qt5 support so moc is properly called on qt.h. Modified Paths: -------------- trunk/include/CMakeLists.txt trunk/include/moc_files.h.in Modified: trunk/include/CMakeLists.txt =================================================================== --- trunk/include/CMakeLists.txt 2014-03-14 23:17:42 UTC (rev 13057) +++ trunk/include/CMakeLists.txt 2014-03-15 00:28:58 UTC (rev 13058) @@ -120,23 +120,28 @@ list(APPEND MOC_OPTIONS -DPLD_extqt) endif(PLD_extqt) if(MOC_OPTIONS) - # Use entirely different method for Qt5. - if(NOT PLPLOT_USE_QT5) - # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}. + # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}. + if(PLPLOT_USE_QT5) + qt5_wrap_cpp( + QT_MOC_OUTFILES + ${CMAKE_SOURCE_DIR}/include/qt.h + OPTIONS ${MOC_OPTIONS} + ) + else(PLPLOT_USE_QT5) qt4_wrap_cpp( QT_MOC_OUTFILES ${CMAKE_SOURCE_DIR}/include/qt.h OPTIONS ${MOC_OPTIONS} ) - # Use custom target to force correct target dependencies in - # various directories. This target is used in three possible - # places (qt_gui, drivers, or src) depending on build options. - # The CMake dependency parser creates the necessary file - # dependency on qt.h for all qt-related source code so there is no - # need to add the ${QT_MOC_OUTFILES} file dependencies for any - # target dependency on moc_outfiles_generated. - add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES}) - endif(NOT PLPLOT_USE_QT5) + endif(PLPLOT_USE_QT5) + # Use custom target to force correct target dependencies in + # various directories. This target is used in three possible + # places (qt_gui, drivers, or src) depending on build options. + # The CMake dependency parser creates the necessary file + # dependency on qt.h for all qt-related source code so there is no + # need to add the ${QT_MOC_OUTFILES} file dependencies for any + # target dependency on moc_outfiles_generated. + add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES}) # #include ${QT_MOC_OUTFILES}) indirectly via the configured moc_files.h # header. Modified: trunk/include/moc_files.h.in =================================================================== --- trunk/include/moc_files.h.in 2014-03-14 23:17:42 UTC (rev 13057) +++ trunk/include/moc_files.h.in 2014-03-15 00:28:58 UTC (rev 13058) @@ -1,7 +1,5 @@ // Configured header file listing the moc-generated files to include in plqt.cpp. #ifndef __MOC_FILES_H__ #define __MOC_FILES_H__ -#ifndef PLPLOT_USE_QT5 #include "@QT_MOC_OUTFILES@" -#endif #endif // __MOC_FILES_H__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |