Skip to content

Commit

Permalink
Fixes for building on Ubuntu Noble (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen authored and marip8 committed Oct 9, 2024
1 parent 5bf036f commit 25e56e0
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 100 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15.0)
# Extract package name and version
find_package(ros_industrial_cmake_boilerplate REQUIRED)
extract_package_metadata(pkg)
project(${pkg_extracted_name} VERSION ${pkg_extracted_version} LANGUAGES CXX)
project(${pkg_extracted_name} VERSION ${pkg_extracted_version} LANGUAGES C CXX)

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")

Expand Down
20 changes: 10 additions & 10 deletions acm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_cpp(ACM_MODEL_headers_MOC include/tesseract_qt/acm/models/allowed_collision_matrix_model.h)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS include/tesseract_qt/acm/widgets)

set(ACM_MODEL_headers_MOC include/tesseract_qt/acm/models/allowed_collision_matrix_model.h)

add_library(${PROJECT_NAME}_acm_models SHARED ${ACM_MODEL_headers_MOC} src/models/allowed_collision_matrix_model.cpp)

Expand All @@ -21,19 +26,14 @@ target_include_directories(
${PROJECT_NAME}_acm_models PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/acm>" "$<INSTALL_INTERFACE:include>")

qt5_wrap_cpp(
ACM_WIDGET_headers_MOC
include/tesseract_qt/acm/widgets/allowed_collision_matrix_widget.h
include/tesseract_qt/acm/widgets/allowed_collision_matrix_editor_widget.h
include/tesseract_qt/acm/widgets/add_allowed_collision_entry_dialog.h)

qt5_wrap_ui(ACM_WIDGET_headers_UI include/tesseract_qt/acm/widgets/allowed_collision_matrix_editor_widget.ui
include/tesseract_qt/acm/widgets/add_allowed_collision_entry_dialog.ui)
set(ACM_WIDGET_headers_MOC
include/tesseract_qt/acm/widgets/allowed_collision_matrix_widget.h
include/tesseract_qt/acm/widgets/allowed_collision_matrix_editor_widget.h
include/tesseract_qt/acm/widgets/add_allowed_collision_entry_dialog.h)

add_library(
${PROJECT_NAME}_acm_widgets SHARED
${ACM_WIDGET_headers_MOC}
${ACM_WIDGET_headers_UI}
src/widgets/allowed_collision_matrix_widget.cpp
src/widgets/allowed_collision_matrix_editor_widget.cpp
src/widgets/add_allowed_collision_entry_dialog.cpp)
Expand Down
61 changes: 26 additions & 35 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,38 @@ find_package(
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_cpp(
COMMON_WIDGETS_headers_MOC
include/tesseract_qt/common/environment_manager.h
include/tesseract_qt/common/environment_wrapper.h
include/tesseract_qt/common/models/json_model.h
include/tesseract_qt/common/models/yaml_model.h
include/tesseract_qt/common/models/component_info_manager_model.h
include/tesseract_qt/common/widgets/cartesian_editor_widget.h
include/tesseract_qt/common/widgets/combo_box.h
include/tesseract_qt/common/widgets/image_viewer_widget.h
include/tesseract_qt/common/widgets/tree_view.h
include/tesseract_qt/common/widgets/component_info_dialog.h
include/tesseract_qt/common/widgets/component_info_manager_widget.h
include/tesseract_qt/common/widgets/component_info_widget.h
include/tesseract_qt/common/widgets/create_child_component_info_dialog.h
include/tesseract_qt/common/widgets/create_component_info_dialog.h
include/tesseract_qt/common/widgets/load_environment_widget.h
include/tesseract_qt/common/widgets/load_environment_dialog.h)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

qt5_wrap_ui(
COMMON_WIDGETS_headers_UI
include/tesseract_qt/common/widgets/cartesian_editor_widget.ui
include/tesseract_qt/common/widgets/image_viewer_widget.ui
include/tesseract_qt/common/widgets/component_info_dialog.ui
include/tesseract_qt/common/widgets/component_info_manager_widget.ui
include/tesseract_qt/common/widgets/component_info_widget.ui
include/tesseract_qt/common/widgets/create_child_component_info_dialog.ui
include/tesseract_qt/common/widgets/create_component_info_dialog.ui
include/tesseract_qt/common/widgets/load_environment_widget.ui
include/tesseract_qt/common/widgets/load_environment_dialog.ui)
set(CMAKE_AUTOUIC_SEARCH_PATHS include/tesseract_qt/common/widgets)

qt5_add_resources(
COMMON_WIDGETS_resources_RCC
include/tesseract_qt/common/resources/tesseract_qt_resources.qrc
include/tesseract_qt/common/resources/themes/dark/qdarkstyle_dark.qrc
include/tesseract_qt/common/resources/themes/light/qdarkstyle_light.qrc)
set(COMMON_WIDGETS_headers_MOC
include/tesseract_qt/common/environment_manager.h
include/tesseract_qt/common/environment_wrapper.h
include/tesseract_qt/common/models/json_model.h
include/tesseract_qt/common/models/yaml_model.h
include/tesseract_qt/common/models/component_info_manager_model.h
include/tesseract_qt/common/widgets/cartesian_editor_widget.h
include/tesseract_qt/common/widgets/combo_box.h
include/tesseract_qt/common/widgets/image_viewer_widget.h
include/tesseract_qt/common/widgets/tree_view.h
include/tesseract_qt/common/widgets/component_info_dialog.h
include/tesseract_qt/common/widgets/component_info_manager_widget.h
include/tesseract_qt/common/widgets/component_info_widget.h
include/tesseract_qt/common/widgets/create_child_component_info_dialog.h
include/tesseract_qt/common/widgets/create_component_info_dialog.h
include/tesseract_qt/common/widgets/load_environment_widget.h
include/tesseract_qt/common/widgets/load_environment_dialog.h)

set(COMMON_WIDGETS_resources_RCC
include/tesseract_qt/common/resources/tesseract_qt_resources.qrc
include/tesseract_qt/common/resources/themes/dark/qdarkstyle_dark.qrc
include/tesseract_qt/common/resources/themes/light/qdarkstyle_light.qrc)

add_library(
${PROJECT_NAME}_common SHARED
${COMMON_WIDGETS_headers_MOC}
${COMMON_WIDGETS_headers_UI}
${COMMON_WIDGETS_resources_RCC}
src/events/component_events.cpp
src/events/allowed_collision_matrix_events.cpp
Expand Down
2 changes: 2 additions & 0 deletions common/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <QStatusBar>
#include <QApplication>

#include <fstream>

namespace tesseract_gui
{
std::vector<std::string> getNamespaces(const std::string& namespace_str, const std::string& separator)
Expand Down
19 changes: 10 additions & 9 deletions environment/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_cpp(ENVIRONMENT_MODEL_headers_MOC include/tesseract_qt/environment/models/environment_commands_model.h)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS include/tesseract_qt/environment/widgets)

set(ENVIRONMENT_MODEL_headers_MOC include/tesseract_qt/environment/models/environment_commands_model.h)

add_library(
${PROJECT_NAME}_environment_models SHARED
Expand Down Expand Up @@ -50,16 +55,12 @@ target_include_directories(
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/environment>"
"$<INSTALL_INTERFACE:include>")

qt5_wrap_cpp(ENVIRONMENT_WIDGET_headers_MOC include/tesseract_qt/environment/widgets/environment_commands_widget.h
include/tesseract_qt/environment/widgets/environment_widget.h)
qt5_wrap_ui(ENVIRONMENT_WIDGET_headers_UI include/tesseract_qt/environment/widgets/environment_widget.ui)
set(ENVIRONMENT_WIDGET_headers_MOC include/tesseract_qt/environment/widgets/environment_commands_widget.h
include/tesseract_qt/environment/widgets/environment_widget.h)

add_library(
${PROJECT_NAME}_environment_widgets SHARED
${ENVIRONMENT_WIDGET_headers_MOC}
${ENVIRONMENT_WIDGET_headers_UI}
src/widgets/environment_widget.cpp
src/widgets/environment_commands_widget.cpp)
${PROJECT_NAME}_environment_widgets SHARED ${ENVIRONMENT_WIDGET_headers_MOC} src/widgets/environment_widget.cpp
src/widgets/environment_commands_widget.cpp)
target_link_libraries(
${PROJECT_NAME}_environment_widgets
PUBLIC tesseract::tesseract_environment
Expand Down
19 changes: 10 additions & 9 deletions joint_trajectory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_cpp(TRAJ_MODEL_headers_MOC include/tesseract_qt/joint_trajectory/models/joint_trajectory_model.h)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS include/tesseract_qt/joint_trajectory/widgets)

set(TRAJ_MODEL_headers_MOC include/tesseract_qt/joint_trajectory/models/joint_trajectory_model.h)

add_library(
${PROJECT_NAME}_joint_trajectory_models SHARED
Expand All @@ -26,18 +31,14 @@ target_include_directories(
${PROJECT_NAME}_joint_trajectory_models PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")

qt5_wrap_cpp(
TRAJ_WIDGET_headers_MOC
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_widget.h
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_tool_bar.h
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_plot_dialog.h)
qt5_wrap_ui(TRAJ_WIDGET_headers_UI include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_widget.ui
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_plot_dialog.ui)
set(TRAJ_WIDGET_headers_MOC
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_widget.h
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_tool_bar.h
include/tesseract_qt/joint_trajectory/widgets/joint_trajectory_plot_dialog.h)

add_library(
${PROJECT_NAME}_joint_trajectory_widgets SHARED
${TRAJ_WIDGET_headers_MOC}
${TRAJ_WIDGET_headers_UI}
src/widgets/joint_trajectory_tool_bar.cpp
src/widgets/joint_trajectory_widget.cpp
src/widgets/joint_trajectory_plot_dialog.cpp)
Expand Down
20 changes: 10 additions & 10 deletions manipulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_cpp(MANIPULATION_WIDGET_headers_MOC include/tesseract_qt/manipulation/manipulation_widget.h
include/tesseract_qt/manipulation/manipulation_tool_bar.h)
qt5_wrap_ui(MANIPULATION_WIDGET_headers_UI include/tesseract_qt/manipulation/manipulation_widget.ui)

add_library(
${PROJECT_NAME}_manipulation_widgets SHARED
${MANIPULATION_WIDGET_headers_MOC}
${MANIPULATION_WIDGET_headers_UI}
src/manipulation_widget.cpp
src/manipulation_tool_bar.cpp)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS include/tesseract_qt/manipulation)

set(MANIPULATION_WIDGET_headers_MOC include/tesseract_qt/manipulation/manipulation_widget.h
include/tesseract_qt/manipulation/manipulation_tool_bar.h)

add_library(${PROJECT_NAME}_manipulation_widgets SHARED ${MANIPULATION_WIDGET_headers_MOC} src/manipulation_widget.cpp
src/manipulation_tool_bar.cpp)

target_link_libraries(
${PROJECT_NAME}_manipulation_widgets
Expand Down
4 changes: 3 additions & 1 deletion planning/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_cpp(PLANNING_headers_MOC include/tesseract_qt/planning/task_composer_problem_model.h)
set(CMAKE_AUTOMOC ON)

set(PLANNING_headers_MOC include/tesseract_qt/planning/task_composer_problem_model.h)

add_library(
${PROJECT_NAME}_planning SHARED
Expand Down
42 changes: 17 additions & 25 deletions plot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,26 @@ find_package(Qwt REQUIRED)
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

qt5_wrap_ui(
PLOT_headers_UI
include/tesseract_qt/plot/plot_widget_editor.ui
include/tesseract_qt/plot/plot_widget_transforms.ui
include/tesseract_qt/plot/transforms/first_derivative.ui
include/tesseract_qt/plot/transforms/integral_transform.ui
include/tesseract_qt/plot/transforms/moving_average_filter.ui
include/tesseract_qt/plot/transforms/moving_rms.ui
include/tesseract_qt/plot/transforms/outlier_removal.ui
include/tesseract_qt/plot/transforms/scale_transform.ui
include/tesseract_qt/plot/transforms/transform_selector.ui)
qt5_wrap_cpp(
PLOT_headers_MOC
include/tesseract_qt/plot/custom_tracker.h
include/tesseract_qt/plot/plot_legend.h
include/tesseract_qt/plot/plot_magnifier.h
include/tesseract_qt/plot/plot_widget.h
include/tesseract_qt/plot/plot_widget_base.h
include/tesseract_qt/plot/plot_widget_editor.h
include/tesseract_qt/plot/plot_widget_transforms.h
include/tesseract_qt/plot/plot_zoomer.h
include/tesseract_qt/plot/plot_subplots.h
include/tesseract_qt/plot/transform_function.h
include/tesseract_qt/plot/transforms/transform_selector.h)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(CMAKE_AUTOUIC_SEARCH_PATHS include/tesseract_qt/plot include/tesseract_qt/plot/transforms)

set(PLOT_headers_MOC
include/tesseract_qt/plot/custom_tracker.h
include/tesseract_qt/plot/plot_legend.h
include/tesseract_qt/plot/plot_magnifier.h
include/tesseract_qt/plot/plot_widget.h
include/tesseract_qt/plot/plot_widget_base.h
include/tesseract_qt/plot/plot_widget_editor.h
include/tesseract_qt/plot/plot_widget_transforms.h
include/tesseract_qt/plot/plot_zoomer.h
include/tesseract_qt/plot/plot_subplots.h
include/tesseract_qt/plot/transform_function.h
include/tesseract_qt/plot/transforms/transform_selector.h)

add_library(
${PROJECT_NAME}_plot SHARED
${PLOT_headers_UI}
${PLOT_headers_MOC}
src/custom_tracker.cpp
src/plot_data.cpp
Expand Down

0 comments on commit 25e56e0

Please sign in to comment.