Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-gui
Commits
e7703643
Commit
e7703643
authored
Feb 12, 2018
by
Joseph Mirabel
Committed by
Joseph Mirabel
Feb 12, 2018
Browse files
HppWidgetsPlugin is compatible with Qt5
parent
7659b1d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
e7703643
...
...
@@ -29,9 +29,20 @@ SET(PROJECT_NAME "hpp-gui")
SET
(
PROJECT_URL
"https://github.com/jmirabel/hpp-gui"
)
SET
(
PROJECT_DESCRIPTION
"Graphical interface for HPP "
)
SET
(
USE_QT4 FALSE CACHE BOOL
"Use Qt4 instead of Qt5"
)
SETUP_PROJECT
()
FIND_PACKAGE
(
Qt4 REQUIRED QtCore QtGui QtOpenGl QtNetwork
)
SET
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
IF
(
USE_QT4
)
FIND_PACKAGE
(
Qt4 REQUIRED QtCore QtGui QtOpenGl QtNetwork
)
ELSE
(
USE_QT4
)
FOREACH
(
component
"Core"
"Widgets"
"Gui"
"OpenGL"
"Concurrent"
"Network"
)
FIND_PACKAGE
(
"Qt5
${
component
}
"
REQUIRED
)
LIST
(
APPEND QT_INCLUDE_DIRS
${
Qt5
${
component
}
_INCLUDE_DIRS
}
)
LIST
(
APPEND QT_LIBRARIES
${
Qt5
${
component
}
_LIBRARIES
}
)
ENDFOREACH
(
component
"Core"
"Widgets"
"Gui"
"OpenGL"
"Network"
)
ENDIF
(
USE_QT4
)
ADD_REQUIRED_DEPENDENCY
(
"gepetto-viewer-corba >= 1.3"
)
...
...
plugins/hppwidgetsplugin/CMakeLists.txt
View file @
e7703643
...
...
@@ -58,12 +58,17 @@ SET(${PLUGIN_NAME}_FORMS
SET
(
${
PLUGIN_NAME
}
_RESOURCES
)
QT4_WRAP_CPP
(
${
PLUGIN_NAME
}
_HEADERS_MOC
${${
PLUGIN_NAME
}
_HEADERS
}
OPTIONS -I
${
GEPETTO_VIEWER_CORBA_INCLUDEDIR
}
)
QT4_WRAP_UI
(
${
PLUGIN_NAME
}
_FORMS_HEADERS
${${
PLUGIN_NAME
}
_FORMS
}
)
QT4_ADD_RESOURCES
(
${
PLUGIN_NAME
}
_RESOURCES_RCC
${${
PLUGIN_NAME
}
_RESOURCES
}
)
IF
(
USE_QT4
)
QT4_WRAP_CPP
(
${
PLUGIN_NAME
}
_HEADERS_MOC
${${
PLUGIN_NAME
}
_HEADERS
}
OPTIONS -I
${
GEPETTO_VIEWER_CORBA_INCLUDEDIR
}
)
QT4_WRAP_UI
(
${
PLUGIN_NAME
}
_FORMS_HEADERS
${${
PLUGIN_NAME
}
_FORMS
}
)
QT4_ADD_RESOURCES
(
${
PLUGIN_NAME
}
_RESOURCES_RCC
${${
PLUGIN_NAME
}
_RESOURCES
}
)
INCLUDE
(
${
QT_USE_FILE
}
)
ELSE
(
USE_QT4
)
QT5_WRAP_CPP
(
${
PLUGIN_NAME
}
_HEADERS_MOC
${${
PLUGIN_NAME
}
_HEADERS
}
OPTIONS -I
${
GEPETTO_VIEWER_CORBA_INCLUDEDIR
}
)
QT5_WRAP_UI
(
${
PLUGIN_NAME
}
_FORMS_HEADERS
${${
PLUGIN_NAME
}
_FORMS
}
)
QT5_ADD_RESOURCES
(
${
PLUGIN_NAME
}
_RESOURCES_RCC
${${
PLUGIN_NAME
}
_RESOURCES
}
)
ENDIF
(
USE_QT4
)
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
INCLUDE
(
${
QT_USE_FILE
}
)
ADD_DEFINITIONS
(
${
QT_DEFINITIONS
}
)
ADD_DEFINITIONS
(
-DQT_PLUGIN
)
ADD_DEFINITIONS
(
-DQT_SHARED
)
...
...
plugins/hppwidgetsplugin/hppwidgetsplugin.cc
View file @
e7703643
...
...
@@ -549,6 +549,8 @@ namespace hpp {
return
target
;
}
#ifdef USE_QT4
Q_EXPORT_PLUGIN2
(
hppwidgetsplugin
,
HppWidgetsPlugin
)
#endif // USE_QT4
}
// namespace gui
}
// namespace hpp
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment