SET(TARGET_SRC osgQtWidgets.cpp ) IF(CMAKE_COMPILER_IS_GNUCXX) # Remove -pedantic flag as it barfs on Qt headers STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ENDIF() if ( QT4_FOUND ) SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY}) INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} ) endif( QT4_FOUND ) SET(TARGET_ADDED_LIBRARIES osgWidget osgQt) #### end var setup ### SET ( EXAMPLE_NAME osgQtWidgets ) SETUP_EXAMPLE(${EXAMPLE_NAME}) IF ( Qt5Widgets_FOUND ) qt5_use_modules( example_${EXAMPLE_NAME} OpenGL WebKitWidgets ) ENDIF( Qt5Widgets_FOUND )