Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrameld committed Feb 18, 2023
1 parent a286f6e commit 2ea8697
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions base_placement_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ find_package(catkin REQUIRED COMPONENTS
moveit_core
)

find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
if(rviz_QT_VERSION VERSION_LESS "5")
find_package(Qt4 ${rviz_QT_VERSION} REQUIRED QtCore QtGui)
include(${QT_USE_FILE})
set(QT_LIBRARIES )
else()
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets Concurrent)
set(QT_LIBRARIES Qt5::Core Qt5::Widgets Qt5::Concurrent)
endif()
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

find_package(HDF5 REQUIRED)
include(${QT_USE_FILE})


add_definitions(-DQT_NO_KEYWORDS)
Expand All @@ -39,7 +48,7 @@ set(base_placement_plugin_SRCS
src/place_base.cpp
src/add_robot_base.cpp


${MOC_FILES}
)

Expand All @@ -51,7 +60,7 @@ set(base_placement_plugin_HDRS
include/base_placement_plugin/place_base.h
include/base_placement_plugin/add_robot_base.h


)

set(base_placement_plugin_UIS
Expand All @@ -77,12 +86,18 @@ catkin_package(
map_creator
)

qt4_wrap_cpp(base_placement_plugin_MOCS ${base_placement_plugin_HDRS} )
qt4_wrap_ui(base_placement_plugin_UIS_H ${base_placement_plugin_UIS} )
if(rviz_QT_VERSION VERSION_LESS "5")
qt4_wrap_cpp(base_placement_plugin_MOCS ${base_placement_plugin_HDRS} )
qt4_wrap_ui(base_placement_plugin_UIS_H ${base_placement_plugin_UIS} )
else()
qt5_wrap_cpp(base_placement_plugin_MOCS ${base_placement_plugin_HDRS} )
qt5_wrap_ui(base_placement_plugin_UIS_H ${base_placement_plugin_UIS} )
endif()


include_directories(${base_placement_plugin_INCLUDE_DIRECTORIES} ${catkin_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS})
add_library(${PROJECT_NAME} ${base_placement_plugin_SRCS} ${base_placement_plugin_MOCS} ${base_placement_plugin_UIS_H}) # ${base_placement_plugin_UIS_H}
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} yaml-cpp ${HDF5_LIBRARIES} create_marker)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_LIBRARIES} yaml-cpp ${HDF5_LIBRARIES} create_marker)
## target_link_libraries(${PROJECT_NAME} yaml-cpp)


Expand Down

0 comments on commit 2ea8697

Please sign in to comment.