Use QT MOC from cmake instead of own implementation
This commit is contained in:
@@ -7,8 +7,6 @@ include_directories (
|
||||
${QT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set (targetName QtViewer)
|
||||
|
||||
# source code directories
|
||||
set (directories
|
||||
.
|
||||
@@ -21,23 +19,15 @@ acg_append_files (sources "*.cc" ${directories})
|
||||
# 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 ${uic_targets} ${sources} ${headers} ${moc_targets})
|
||||
acg_add_executable (QtViewer 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} ${uic_targets} ${sources} ${headers} ${moc_targets})
|
||||
acg_add_executable (QtViewer ${sources} ${headers})
|
||||
endif ()
|
||||
|
||||
target_link_libraries (${targetName}
|
||||
target_link_libraries (QtViewer
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
${QT_LIBRARIES}
|
||||
|
||||
Reference in New Issue
Block a user