OpenSceneGraph/examples/osgviewerQtContext/CMakeLists.txt
Robert Osfield 6d046e9fa1 From Wang Rui, "I've just made another OSG+Qt (GUI) examples to demonstrate how to create OSG views, add them to a CompositeViewer, and add corresponding widgets to Qt layouts or as popup windows. The example inherits a GraphicsWindowQt from the GraphicsWindow base class and implements most of the virtual methods. A QGLWidget is created at the same time to perform keyboards and mouse events, who is also added as the main widget's child.
The new example, named osgviewerQtContext (because of deriving from GraphicsContext), works fine on Windows XP SP3 and Qt 4.5.0, with 4 widgets in QGridLayout and a popup window and 60Hz frame rate. I haven't tested it on Unix/Linux and Mac OSX yet. So any feedback from these platforms is appreciated. I wish this example be a useful complement to current osgviewerQt and osgviewerQtWidgets ones. :)

Some unfinished functionalities: inheritedWindowData, sharedContext, and more tests needed."
2010-04-30 12:22:31 +00:00

16 lines
433 B
CMake

SET( TARGET_SRC
GraphicsWindowQt
GraphicsWindowQt.cpp
osgviewerQtContext.cpp
)
IF( QT4_FOUND )
SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY_RELEASE} ${QT_QTGUI_LIBRARY_RELEASE} ${QT_QTOPENGL_LIBRARY_RELEASE} )
ADD_DEFINITIONS(-DUSE_QT4)
ELSE( QT4_FOUND )
SET(TARGET_EXTERNAL_LIBRARIES ${QT_LIBRARIES} )
ENDIF( QT4_FOUND )
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
SETUP_EXAMPLE( osgviewerQtContext )