Skip to content

Add USE_QT4 to allow building with Qt4 when Qt5 also present #850

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

Closed
wants to merge 1 commit into from

Conversation

cjmayo
Copy link

@cjmayo cjmayo commented Jan 18, 2017

I'm building osgEarth to support the Globe plugin for QGIS. QGIS stable is still recommending Qt4 at this time but I also have Qt5 installed. Currently osgEarth will automatically build for Qt5 for me.

This is my quick solution, adding a USE_QT4 option. Submitting here in case it is useful for others.

Without USE_QT4 it will still build for Qt5 if installed. It won't automatically fallback from trying Qt5 to try Qt4 - arguably that's an improvement.
Happy to change the logic, create a OSGEARTH_USE_QT4? etc. Possibly CMake should fail if OSGEARTH_USE_QT is set and no Qt is found.

@manisandro
Copy link
Contributor

manisandro commented Mar 14, 2017

Globe maintainer here. I'd like to go further with this and actually allow side-by-side installation of the qt4 and qt5 variants (to allow developing both qgis-2.x and qgis-3.x without library chaos). I've got a patch which, in addition to allowing to choose the Qt version via USE_QT5={true/false}, changes the names of the osgEarthQt library and the qt applications to allow installing both variants without conflicts. The patch is here: https://github.com/manisandro/osgearth/commit/80901d4d9e07bf7a271e9da23fbc8ed9b6c2e909
@cjmayo Shall I open a new PR or do you want to integrate these changes into this PR?

A similar patch I've proposed to osgQt has been merged: openscenegraph/osgQt#3

@gwaldron
Copy link
Owner

You can integrate the changes, but please take care with the versioning. osgEarth must be able to build against OSG 3.4 up through the master branch.

@cjmayo
Copy link
Author

cjmayo commented Mar 14, 2017

@manisandro I've tested (osgEarth 2.8.0 with OpenSceneGraph 3.4.0) manisandro@80901d4 for my case of both Qt4 and Qt5 installed and only building for Qt4 and as it does that and more happy to close this one.

@cjmayo cjmayo closed this Mar 14, 2017
@manisandro
Copy link
Contributor

Just for info, I'm waiting for openscenegraph/osgQt#4 and then I'll prepare the PR for osgearth.

@cjmayo cjmayo deleted the use_qt4 branch February 25, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants