root/OpenSceneGraph/trunk/examples/osgviewerQt/CMakeLists.txt @ 13482

Revision 13482, 0.7 kB (checked in by robert, 4 hours ago)

Introduced new scheme for setting up which version of OpenGL/OpenGL ES the OSG is compiled for.

To select standard OpenGL 1/2 build with full backwards and forwards comtability use:

./configure
make

OR

./configure -DOPENGL_PROFILE=GL2

To select OpenGL 3 core profile build using GL3/gl3.h header:

./configure -DOPENGL_PROFILE=GL3

To select OpenGL Arb core profile build using GL/glcorearb.h header:

./configure -DOPENGL_PROFILE=GLCORE

To select OpenGL ES 1.1 profile use:

./configure -DOPENGL_PROFILE=GLES1

To select OpenGL ES 2 profile use:

./configure -DOPENGL_PROFILE=GLES2

Using OPENGL_PROFILE will select all the appropriate features required so no other settings in cmake will need to be adjusted.
The new configuration options are stored in the include/osg/OpenGL header that deprecates the old include/osg/GL header.

  • Property svn:eol-style set to native
Line 
1SET( TARGET_SRC
2    osgviewerQt.cpp
3)
4
5IF ( NOT Qt5Widgets_FOUND )
6    IF( QT4_FOUND )
7    SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY_RELEASE} ${QT_QTGUI_LIBRARY_RELEASE}
8        ${QT_QTOPENGL_LIBRARY_RELEASE} )
9    ADD_DEFINITIONS(-DUSE_QT4)
10    ELSE( QT4_FOUND )
11    SET(TARGET_EXTERNAL_LIBRARIES ${QT_LIBRARIES} )
12    ENDIF( QT4_FOUND )
13
14    INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
15             ${QT_QTOPENGL_INCLUDE_DIR} )
16ENDIF()
17
18SET(TARGET_ADDED_LIBRARIES osgWidget osgQt)
19
20SET( EXAMPLE_NAME osgviewerQt )
21
22SETUP_EXAMPLE( ${EXAMPLE_NAME} )
23
24IF ( Qt5Widgets_FOUND )
25    qt5_use_modules( example_${EXAMPLE_NAME} Widgets OpenGL )
26ENDIF( Qt5Widgets_FOUND )
27
Note: See TracBrowser for help on using the browser.