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}.")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(USE_QT4)
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}")
ELSE(USE_QT4)
FOREACH (component "Core" "Widgets" "Gui" "OpenGL" "Concurrent" "Network")
......
......@@ -42,8 +42,8 @@ namespace hpp {
return QString ("hpp-corbaserver plugin");
}
#ifdef USE_QT4
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppcorbaserverplugin, HppCorbaserverPlugin)
#endif // USE_QT4
#endif
} // namespace gui
} // namespace hpp
......@@ -15,9 +15,9 @@ namespace hpp {
{
Q_OBJECT
Q_INTERFACES (gepetto::gui::PluginInterface)
#ifndef USE_QT4
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA (IID "hpp-gui.hppcorbaserverplugin")
#endif // USE_QT4
#endif
public:
explicit HppCorbaserverPlugin ();
......
......@@ -517,8 +517,8 @@ namespace hpp {
constraintWidget_->addConstraint(new ManipulationLockedJoint(this));
}
#ifdef USE_QT4
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppmanipulationwidgetsplugin, HppManipulationWidgetsPlugin)
#endif // USE_QT4
#endif
} // namespace gui
} // namespace hpp
......@@ -22,9 +22,9 @@ namespace hpp {
gepetto::gui::ModelInterface
gepetto::gui::CorbaInterface)
#ifndef USE_QT4
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA (IID "hpp-gui.hppmanipulationwidgetsplugin")
#endif // USE_QT4
#endif
public:
typedef hpp::corbaServer::manipulation::Client HppManipClient;
......
......@@ -549,8 +549,8 @@ namespace hpp {
return target;
}
#ifdef USE_QT4
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (hppwidgetsplugin, HppWidgetsPlugin)
#endif // USE_QT4
#endif
} // namespace gui
} // namespace hpp
......@@ -25,9 +25,9 @@ namespace hpp {
gepetto::gui::ModelInterface
gepetto::gui::CorbaInterface)
#ifndef USE_QT4
#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
Q_PLUGIN_METADATA (IID "hpp-gui.hppwidgetsplugin")
#endif // USE_QT4
#endif
public:
struct JointElement {
......
......@@ -253,8 +253,8 @@ namespace hpp {
msgBox_->show();
}
#ifdef USE_QT4
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
Q_EXPORT_PLUGIN2 (remoteimuplugin, RemoteImuPlugin)
#endif // USE_QT4
#endif
} // namespace gui
} // namespace hpp
......@@ -103,9 +103,9 @@ namespace hpp {
{
Q_OBJECT
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")
#endif // USE_QT4
#endif
public:
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