-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Adding support of Qt5 for QGLViewer that was compiled with it #983
Conversation
Great, I look it, and by the way have you check if DGtalTools is also fine with QT5 ? |
No, sorry I haven't verified if DGtalTools works with Qt5 and my modification. |
I made some modifications in DGtal and DGtaltools and I have compiled 99% of DGtalTools for the moment.. |
I just tested on my config and from the construction i obtain: CMake Error at cmake/CheckDGtalOptionalDependencies.cmake:340 (find_package): Could not find a package configuration file provided by "Qt5" with any of
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" |
You must specify by hand the path where cmake can find qmake and where are the Qt5config files. For me for instance, qmake is here : /Users/naubry/Qt/5.4/clang_64/bin/qmake I have used cmake-gui to add these variables, it's more convenient :) |
My last message was from my current build, so I tried with an empty one I have no error message but with your change it doesn't consider QT 4 so when QGLviewer is activated with ccmake construct as all as if it was not present. ;( |
@@ -21,7 +21,7 @@ OPTION(WITH_MAGICK "With GraphicsMagick++." OFF) | |||
OPTION(WITH_ITK "With Insight Toolkit ITK." OFF) | |||
OPTION(WITH_CAIRO "With CairoGraphics." OFF) | |||
OPTION(WITH_HDF5 "With HDF5." OFF) | |||
OPTION(WITH_QGLVIEWER "With LibQGLViewer for 3D visualization (Qt required)." OFF) | |||
OPTION(WITH_QGLVIEWER_QT "With LibQGLViewer for 3D visualization (Qt required)." OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the WITH_QGLVIEWER flag, this flag is used at many places in the code.
I would suggest
|
@naubry does it make sense for you ? |
That makes sense to me. I have already started working in this direction last night. |
I have added an option to activate Qt5. |
Sorry, I made a mistake when I merged my new code with this branch... |
Looks fine for me, tested with default QT4 and QT5 (we need to specify the qt5 dir:Qt5_DIR=/Users/kerautre/Qt/5.4/clang_64/lib/cmake/Qt5/) . |
Thanks @naubry. There is still something that puzzles me. The QT includes:
in the examples seem to be duplicated since there are already included in Viewer3D. I know some of them were already there before your QT5 thing but maybe we should cleanup this up. |
@kerautret See the the @kerautret can you make sure that in the doc, we only require to include "Viewer3D.h" and not the Qt stuff when using the viewer ? (Viewer3D should be in charge to include all qt deps) |
I look it for the doc |
…n cmakefile for DGTalTools
@dcoeurjo I confirm the doc don''t refer to any QT include... |
Perfect @naubry thanks a lot.. |
Adding support of Qt5 for QGLViewer that was compiled with it
Hi,
I'm trying to add the support of Qt5 in order to use QGLViewer that was compiled with it. I'm not sure that is the best way to integrate it but I made the maximum to keep both functionnalities (The possibility to use Qt4 and/or Qt5).
I changed two files : CheckDGtalOptionalDependencies.cmake and Viewer3D.h.
In the Viewer3D.h file, I only changed one line and I think it's working on both Qt4 and Qt5 without a conditionnal test...
I remain at your disposal for any questions or modifications.