From 779b16a2653a74fd0fd35394c889acc134398e2c Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Thu, 19 Sep 2024 16:14:16 +0200 Subject: [PATCH] Generalize gz vendor use and modernize CMake (#82) Author: Jose Luis Rivero Approver: Chris Iverach-Brereton --- turtlebot4_gz_gui_plugins/CMakeLists.txt | 2 ++ turtlebot4_gz_gui_plugins/Turtlebot4Hmi/CMakeLists.txt | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/turtlebot4_gz_gui_plugins/CMakeLists.txt b/turtlebot4_gz_gui_plugins/CMakeLists.txt index 21842f8..c446df7 100644 --- a/turtlebot4_gz_gui_plugins/CMakeLists.txt +++ b/turtlebot4_gz_gui_plugins/CMakeLists.txt @@ -7,6 +7,8 @@ endif() # find dependencies find_package(ament_cmake REQUIRED) +find_package(gz_gui_vendor REQUIRED) +find_package(gz-gui) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) diff --git a/turtlebot4_gz_gui_plugins/Turtlebot4Hmi/CMakeLists.txt b/turtlebot4_gz_gui_plugins/Turtlebot4Hmi/CMakeLists.txt index 29b8bce..2b37401 100644 --- a/turtlebot4_gz_gui_plugins/Turtlebot4Hmi/CMakeLists.txt +++ b/turtlebot4_gz_gui_plugins/Turtlebot4Hmi/CMakeLists.txt @@ -17,8 +17,10 @@ find_package(Qt5 ) # Find the Gz gui library -find_package(gz-gui8 REQUIRED) -find_package(gz-common5 REQUIRED) +find_package(gz_gui_vendor REQUIRED) +find_package(gz-gui REQUIRED) +find_package(gz_common_vendor REQUIRED) +find_package(gz-common REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GZ-GUI_CXX_FLAGS}") @@ -39,6 +41,7 @@ link_directories( ) # Generate examples +# MOC parsing is broken on Ionic: https://github.com/gazebosim/gz-msgs/issues/463 add_library(Turtlebot4Hmi SHARED ${headers_MOC} Turtlebot4Hmi.cc ${resources_rcc}