2009-06-04 10:00:51 +00:00
|
|
|
include (ACGCommon)
|
|
|
|
|
|
|
|
|
|
include_directories (
|
|
|
|
|
../../../..
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
${GLUT_INCLUDE_DIR}
|
2009-09-02 12:49:16 +00:00
|
|
|
${QT_INCLUDE_DIR}
|
2009-06-04 10:00:51 +00:00
|
|
|
)
|
|
|
|
|
|
2011-03-09 09:52:57 +00:00
|
|
|
|
2009-06-04 10:00:51 +00:00
|
|
|
set (targetName DecimaterGui)
|
|
|
|
|
|
|
|
|
|
# source code directories
|
|
|
|
|
set (directories
|
|
|
|
|
../../QtViewer
|
|
|
|
|
../
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# collect all header and source files
|
|
|
|
|
acg_append_files (headers "*.hh" ${directories})
|
|
|
|
|
|
|
|
|
|
set (sources
|
|
|
|
|
../../QtViewer/QGLViewerWidget.cc
|
|
|
|
|
../../QtViewer/MeshViewerWidgetT.cc
|
|
|
|
|
../DecimaterViewerWidget.cc
|
|
|
|
|
../decimaterviewer.cc
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# remove template cc files from source file list
|
|
|
|
|
acg_drop_templates (sources)
|
|
|
|
|
|
|
|
|
|
# genereate uic and moc targets
|
2014-07-17 12:57:04 +00:00
|
|
|
if(QT5_FOUND)
|
|
|
|
|
acg_qt5_automoc (moc_targets ${headers})
|
|
|
|
|
else()
|
|
|
|
|
acg_qt4_automoc (moc_targets ${headers})
|
|
|
|
|
endif()
|
2009-06-04 10:00:51 +00:00
|
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
|
acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets})
|
|
|
|
|
# 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})
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
target_link_libraries (${targetName}
|
|
|
|
|
OpenMeshCore
|
|
|
|
|
OpenMeshTools
|
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
|
${GLUT_LIBRARIES}
|
|
|
|
|
)
|
|
|
|
|
|