qt5 apps support
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1103 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -41,8 +41,14 @@ if ( BUILD_APPS )
|
||||
find_package (OpenGL)
|
||||
find_package (GLUT)
|
||||
|
||||
# try to use QT5 if possible otherwise stick to QT4
|
||||
set (FORCE_QT4 OFF CACHE BOOL "Use Qt4 even if Qt5 was found")
|
||||
|
||||
# For the apps, we need qt and opengl to build them
|
||||
if (NOT QT4_FOUND)
|
||||
if (NOT QT5_FOUND AND NOT FORCE_QT4)
|
||||
acg_qt5 ()
|
||||
endif()
|
||||
if (NOT QT5_FOUND AND NOT QT4_FOUND)
|
||||
find_package (Qt4 COMPONENTS QtCore QtGui )
|
||||
|
||||
set (QT_USE_QTOPENGL 1)
|
||||
@@ -55,7 +61,8 @@ if ( BUILD_APPS )
|
||||
endif()
|
||||
|
||||
# check for OpenGL and GLUT as our required dependencies
|
||||
if (QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||
if ((QT5_FOUND OR QT4_FOUND) AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||
|
||||
add_subdirectory (Decimating/DecimaterGui)
|
||||
add_subdirectory (QtViewer)
|
||||
add_subdirectory (Subdivider/SubdividerGui)
|
||||
|
||||
@@ -30,7 +30,11 @@ set (sources
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
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})
|
||||
|
||||
@@ -40,7 +40,11 @@ list (APPEND headers "../QtViewer/MeshViewerWidgetT.hh")
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
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})
|
||||
|
||||
@@ -23,8 +23,13 @@ acg_append_files (ui "*.ui" ${directories})
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
acg_qt4_autouic (uic_targets ${ui})
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
if(QT5_FOUND)
|
||||
acg_qt5_autouic (uic_targets ${ui})
|
||||
acg_qt5_automoc (moc_targets ${headers})
|
||||
else()
|
||||
acg_qt4_autouic (uic_targets ${ui})
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
#include <OpenMesh/Core/Geometry/VectorT.hh>
|
||||
#include <QtOpenGL/qgl.h>
|
||||
#include <QGLWidget>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
@@ -139,7 +139,7 @@ SubdivideWidget(QWidget* _parent, const char* _name)
|
||||
|
||||
QButtonGroup* buttonGroup = new QButtonGroup();
|
||||
|
||||
buttonGroup->setExclusive( TRUE );
|
||||
buttonGroup->setExclusive( true );
|
||||
|
||||
// insert 2 radiobuttons
|
||||
QRadioButton* radio1 = new QRadioButton( "Comp. Loop" );
|
||||
@@ -149,7 +149,7 @@ SubdivideWidget(QWidget* _parent, const char* _name)
|
||||
QRadioButton* radio5 = new QRadioButton( "Interpolating Sqrt3" );
|
||||
QRadioButton* radio6 = new QRadioButton( "Modified Butterfly" );
|
||||
// QRadioButton* radio7 = new QRadioButton( "Catmull Clark" ); // Disabled, as it needs a quad mesh!
|
||||
radio3->setChecked( TRUE );
|
||||
radio3->setChecked( true );
|
||||
sel_topo_type = SOP_UniformLoop;
|
||||
|
||||
buttonGroup->addButton(radio1, SOP_UniformCompositeLoop);
|
||||
|
||||
@@ -29,7 +29,11 @@ set (sources
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
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})
|
||||
|
||||
@@ -23,7 +23,11 @@ list (APPEND headers "../../QtViewer/MeshViewerWidgetT.hh")
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
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})
|
||||
|
||||
Reference in New Issue
Block a user