Use QT MOC from cmake instead of own implementation

This commit is contained in:
Jan Möbius
2018-12-14 11:14:13 +01:00
parent 3f52d2426a
commit 32379e8772
9 changed files with 192 additions and 201 deletions

View File

@@ -39,19 +39,12 @@ list (APPEND headers "../QtViewer/MeshViewerWidgetT.hh")
# remove template cc files from source file list
acg_drop_templates (sources)
# genereate uic and moc targets
if(QT5_FOUND)
acg_qt5_automoc (moc_targets ${headers})
else()
acg_qt4_automoc (moc_targets ${headers})
endif()
if (WIN32)
acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets})
acg_add_executable (${targetName} WIN32 ${sources} ${headers})
# link to qtmain library to get WinMain function for a non terminal app
target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY})
else ()
acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets})
acg_add_executable (${targetName} ${sources} ${headers})
endif ()
target_link_libraries (${targetName}