From c374aa300a7ccc614c1b34ee581b718e759723d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Maceiras?= Date: Mon, 16 Dec 2024 10:49:21 +0100 Subject: [PATCH] fix: Fixed building with ROS --- CMakeLists.txt | 4 ++++ README.md | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fd87b5..3fc71d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,10 @@ set(PYTHON_SITE_PACKAGES_INSTALL_DIR "${Python3_SITEARCH}") if(DEFINED ENV{USE_COLCON}) + + set(PYTHON_SITE_PACKAGES_REL_INSTALL_DIR "lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages") + set(PYTHON_SITE_PACKAGES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PACKAGES_REL_INSTALL_DIR}") + message(STATUS "ROS2 INSTALLATION DETECTED") find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) diff --git a/README.md b/README.md index 3d8310a..58ecccc 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,12 @@ compiling *pygafro*, which can become problematic on lower-end computers. export CXX=/usr/bin/clang++ pip install pygafro +## Installation with ROS2 + +Add PyGafro in your colcon workspace and build it with: + + CC=clang CXX=clang++ USE_COLCON=1 colcon build + ## Installation from source (works either in a conda or virtual environment)