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)