[osg-submissions] Qt 3 vs 4 under linux
Mathieu MARACHE
mathieu.marache at gmail.com
Tue Sep 25 03:24:55 PDT 2007
Hi Robert,
I recall having the problem discussed on the osg-build list. But since
we had a no-go, here I go again.
I need to build OpenSceneGraph without human intervention and the
FindQt3 followed by a FindQt4 leads to a mixed (Qt3/Qt4) settings of
the flags making the example osgviewerQT to fail it's compilation...
The CMake solution for Qt is to set the value of DESIRED_QT_VERSION to
either 3 or 4 and use FindQt . However our last discussion on this
issue lead to leaving my input commented out in the root
CMakeList.txt, it was fine for me but not the optimum solution.
I now come back with a slight modification making a call to cmake with
the appropriate flag to work like I'd like to but wihtout, then it
would work just the same as before. Please consider this for svn
checkin :
===================================================================
--- CMakeLists.txt (révision 7470)
+++ CMakeLists.txt (copie de travail)
@@ -179,10 +179,12 @@
FIND_PACKAGE(ZLIB)
FIND_PACKAGE(GDAL)
-# SET(DESIRED_QT_VERSION 3)
-# FIND_PACKAGE(Qt)
-FIND_PACKAGE(Qt3)
-FIND_PACKAGE(Qt4)
+IF(DESIRED_QT_VERSION)
+ FIND_PACKAGE(Qt)
+ELSE(DESIRED_QT_VERSION)
+ FIND_PACKAGE(Qt3)
+ FIND_PACKAGE(Qt4)
+ENDIF(DESIRED_QT_VERSION)
SET(wxWidgets_USE_LIBS base core gl net)
FIND_PACKAGE(wxWidgets)
====================================================================
Then calling 'cmake -DDESIRED_QT_VERSION=4 ... ' triggers the patch
Regards,
--
Mathieu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
Url: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20070925/4f0eee78/attachment-0001.txt
More information about the osg-submissions
mailing list