Skip to content

Commit

Permalink
Merge pull request #154 from ROBOTIS-GIT/develop
Browse files Browse the repository at this point in the history
update Qt5 and delete Qt4 config
  • Loading branch information
Taehun Lim authored Jun 4, 2018
2 parents 7f718ac + 200cb38 commit e055cbc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 33 deletions.
36 changes: 6 additions & 30 deletions dynamixel_workbench_single_manager_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@ add_compile_options(-std=c++11)
################################################################################
find_package(catkin REQUIRED COMPONENTS
roscpp
rqt_gui
rqt_gui_cpp
dynamixel_workbench_msgs
dynamixel_workbench_toolbox
)

if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
find_package(Qt5Widgets REQUIRED)
else()
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
endif()
find_package(Qt5Widgets REQUIRED)

set(${PROJECT_NAME}_SRCS
src/main.cpp
Expand Down Expand Up @@ -70,26 +63,17 @@ endif()
################################################################################
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS roscpp rqt_gui rqt_gui_cpp dynamixel_workbench_msgs dynamixel_workbench_toolbox
CATKIN_DEPENDS roscpp dynamixel_workbench_msgs dynamixel_workbench_toolbox
)

if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
qt5_wrap_cpp(${PROJECT_NAME}_MOCS ${${PROJECT_NAME}_HDRS})
qt5_add_resources(${PROJECT_NAME}_RCC ${${PROJECT_NAME}_RESOURCES})
else()
qt4_wrap_cpp(${PROJECT_NAME}_MOCS ${${PROJECT_NAME}_HDRS})
qt4_add_resources(${PROJECT_NAME}_RCC ${${PROJECT_NAME}_RESOURCES})
endif()
qt5_wrap_cpp(${PROJECT_NAME}_MOCS ${${PROJECT_NAME}_HDRS})
qt5_add_resources(${PROJECT_NAME}_RCC ${${PROJECT_NAME}_RESOURCES})

# ensure generated header files are being created in the devel space
set(_cmake_current_binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_CURRENT_BINARY_DIR ${dynamixel_workbench_single_manager_gui_INCLUDE_DIRECTORIES})

if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
qt5_wrap_ui(${PROJECT_NAME}_UIS_H ${${PROJECT_NAME}_UIS})
else()
qt4_wrap_ui(${PROJECT_NAME}_UIS_H ${${PROJECT_NAME}_UIS})
endif()
qt5_wrap_ui(${PROJECT_NAME}_UIS_H ${${PROJECT_NAME}_UIS})

set(CMAKE_CURRENT_BINARY_DIR "${_cmake_current_binary_dir}")

Expand All @@ -104,15 +88,7 @@ include_directories(

add_executable(dynamixel_workbench_single_manager_gui ${dynamixel_workbench_single_manager_gui_SRCS} ${dynamixel_workbench_single_manager_gui_MOCS} ${dynamixel_workbench_single_manager_gui_UIS_H} ${dynamixel_workbench_single_manager_gui_RCC})
add_dependencies(dynamixel_workbench_single_manager_gui ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(dynamixel_workbench_single_manager_gui ${catkin_LIBRARIES})
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
else()
target_link_libraries(${PROJECT_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
endif()

find_package(class_loader)
class_loader_hide_library_symbols(${PROJECT_NAME})
target_link_libraries(dynamixel_workbench_single_manager_gui Qt5::Widgets ${catkin_LIBRARIES})

#################################################################################
## Install
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#ifndef Q_MOC_RUN

#include <ros/ros.h>
#include <rqt_gui_cpp/plugin.h>
#include <string>
#include <QThread>
#include <QStringListModel>
Expand Down
6 changes: 4 additions & 2 deletions dynamixel_workbench_single_manager_gui/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
<url type="bugtracker">https://github.com/ROBOTIS-GIT/dynamixel-workbench/issues</url>
<buildtool_depend>catkin</buildtool_depend>
<depend>roscpp</depend>
<depend>rqt_gui</depend>
<depend>rqt_gui_cpp</depend>
<depend>qtbase5-dev</depend>
<depend>qt5-qmake</depend>
<depend>dynamixel_workbench_msgs</depend>
<depend>dynamixel_workbench_toolbox</depend>
<exec_depend>libqt5-core</exec_depend>
<exec_depend>libqt5-gui</exec_depend>
</package>

0 comments on commit e055cbc

Please sign in to comment.