Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use setup_qt determined Qt version for finding osgQt #137

Open
wants to merge 1 commit into
base: mars2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions graphics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,18 @@ if(USE_VERTEX_BUFFER)
ADD_DEFINITIONS(-DUSE_VERTEX_BUFFER)
endif()

pkg_check_modules(OSGQT openscenegraph-osgQt5)
if(OSGQT_FOUND)
find_package(OpenSceneGraph REQUIRED osgManipulator osgViewer osgFX osgShadow osgParticle osgTerrain osgDB osgGA osgWidget osgText osgUtil)

include_directories(${OSGQT_INCLUDE_DIRS})
link_directories(${OSGQT_LIBRARY_DIRS})
add_definitions(${OSGQT_CFLAGS_OTHER}) #cflags without -I
set (QT_USE_QTOPENGL TRUE)
setup_qt()

if (PREFERE_QT4)
find_package(OpenSceneGraph REQUIRED osgManipulator osgViewer osgFX osgShadow osgParticle osgTerrain osgDB osgGA osgWidget osgText osgUtil osgQt)
else()
find_package(OpenSceneGraph REQUIRED osgManipulator osgViewer osgFX osgShadow osgParticle osgTerrain osgDB osgGA osgWidget osgText osgUtil osgQt)
pkg_check_modules(OSGQT openscenegraph-osgQt5)
find_package(OpenSceneGraph REQUIRED osgManipulator osgViewer osgFX osgShadow osgParticle osgTerrain osgDB osgGA osgWidget osgText osgUtil)

include_directories(${OSGQT_INCLUDE_DIRS})
link_directories(${OSGQT_LIBRARY_DIRS})
add_definitions(${OSGQT_CFLAGS_OTHER}) #cflags without -I
endif()

include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
Expand All @@ -61,9 +63,6 @@ if(${HAVE_OSG_VERSION_H})
ADD_DEFINITIONS(-DHAVE_OSG_VERSION_H)
endif()

set (QT_USE_QTOPENGL TRUE)
setup_qt()

pkg_check_modules(PKGCONFIG REQUIRED
lib_manager
mars_interfaces
Expand Down