Commit 9d40de3c authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Use Qt version check mechanism

parent 95b33864
...@@ -52,7 +52,6 @@ MESSAGE(STATUS "Looking for Qt ${DESIRED_QT_VERSION_MAJOR}.") ...@@ -52,7 +52,6 @@ MESSAGE(STATUS "Looking for Qt ${DESIRED_QT_VERSION_MAJOR}.")
SET(CMAKE_INCLUDE_CURRENT_DIR ON) SET(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(USE_QT4) IF(USE_QT4)
FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGl QtNetwork) FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtOpenGl QtNetwork)
ADD_DEFINITIONS(-DUSE_QT4)
SET(PKG_CONFIG_EXTRA "qtversion: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}") SET(PKG_CONFIG_EXTRA "qtversion: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
ELSE(USE_QT4) ELSE(USE_QT4)
FOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Concurrent" "Network") FOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Concurrent" "Network")
......
...@@ -42,8 +42,8 @@ namespace hpp { ...@@ -42,8 +42,8 @@ namespace hpp {
return QString ("hpp-corbaserver plugin"); return QString ("hpp-corbaserver plugin");
} }
#ifdef USE_QT4 #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppcorbaserverplugin, HppCorbaserverPlugin) Q_EXPORT_PLUGIN2 (hppcorbaserverplugin, HppCorbaserverPlugin)
#endif // USE_QT4 #endif
} // namespace gui } // namespace gui
} // namespace hpp } // namespace hpp
...@@ -15,9 +15,9 @@ namespace hpp { ...@@ -15,9 +15,9 @@ namespace hpp {
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES (gepetto::gui::PluginInterface) Q_INTERFACES (gepetto::gui::PluginInterface)
#ifndef USE_QT4 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA (IID "hpp-gui.hppcorbaserverplugin") Q_PLUGIN_METADATA (IID "hpp-gui.hppcorbaserverplugin")
#endif // USE_QT4 #endif
public: public:
explicit HppCorbaserverPlugin (); explicit HppCorbaserverPlugin ();
......
...@@ -517,8 +517,8 @@ namespace hpp { ...@@ -517,8 +517,8 @@ namespace hpp {
constraintWidget_->addConstraint(new ManipulationLockedJoint(this)); constraintWidget_->addConstraint(new ManipulationLockedJoint(this));
} }
#ifdef USE_QT4 #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppmanipulationwidgetsplugin, HppManipulationWidgetsPlugin) Q_EXPORT_PLUGIN2 (hppmanipulationwidgetsplugin, HppManipulationWidgetsPlugin)
#endif // USE_QT4 #endif
} // namespace gui } // namespace gui
} // namespace hpp } // namespace hpp
...@@ -22,9 +22,9 @@ namespace hpp { ...@@ -22,9 +22,9 @@ namespace hpp {
gepetto::gui::ModelInterface gepetto::gui::ModelInterface
gepetto::gui::CorbaInterface) gepetto::gui::CorbaInterface)
#ifndef USE_QT4 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA (IID "hpp-gui.hppmanipulationwidgetsplugin") Q_PLUGIN_METADATA (IID "hpp-gui.hppmanipulationwidgetsplugin")
#endif // USE_QT4 #endif
public: public:
typedef hpp::corbaServer::manipulation::Client HppManipClient; typedef hpp::corbaServer::manipulation::Client HppManipClient;
......
...@@ -549,8 +549,8 @@ namespace hpp { ...@@ -549,8 +549,8 @@ namespace hpp {
return target; return target;
} }
#ifdef USE_QT4 #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppwidgetsplugin, HppWidgetsPlugin) Q_EXPORT_PLUGIN2 (hppwidgetsplugin, HppWidgetsPlugin)
#endif // USE_QT4 #endif
} // namespace gui } // namespace gui
} // namespace hpp } // namespace hpp
...@@ -25,9 +25,9 @@ namespace hpp { ...@@ -25,9 +25,9 @@ namespace hpp {
gepetto::gui::ModelInterface gepetto::gui::ModelInterface
gepetto::gui::CorbaInterface) gepetto::gui::CorbaInterface)
#ifndef USE_QT4 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA (IID "hpp-gui.hppwidgetsplugin") Q_PLUGIN_METADATA (IID "hpp-gui.hppwidgetsplugin")
#endif // USE_QT4 #endif
public: public:
struct JointElement { struct JointElement {
......
...@@ -253,8 +253,8 @@ namespace hpp { ...@@ -253,8 +253,8 @@ namespace hpp {
msgBox_->show(); msgBox_->show();
} }
#ifdef USE_QT4 #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (remoteimuplugin, RemoteImuPlugin) Q_EXPORT_PLUGIN2 (remoteimuplugin, RemoteImuPlugin)
#endif // USE_QT4 #endif
} // namespace gui } // namespace gui
} // namespace hpp } // namespace hpp
...@@ -103,9 +103,9 @@ namespace hpp { ...@@ -103,9 +103,9 @@ namespace hpp {
{ {
Q_OBJECT Q_OBJECT
Q_INTERFACES (gepetto::gui::PluginInterface gepetto::gui::JointModifierInterface) Q_INTERFACES (gepetto::gui::PluginInterface gepetto::gui::JointModifierInterface)
#ifndef USE_QT4 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA(IID "hpp-gui.remoteimuplugin") Q_PLUGIN_METADATA(IID "hpp-gui.remoteimuplugin")
#endif // USE_QT4 #endif
public: public:
virtual ~RemoteImuPlugin (); virtual ~RemoteImuPlugin ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment