From 15d443f5ca44642c13f1e279c341f1cb502ec28a Mon Sep 17 00:00:00 2001 From: Atticus Russell Date: Tue, 20 Jun 2023 01:01:13 -0400 Subject: [PATCH] find lib helper --- .github/workflows/ci-industrial.yml | 34 ++++++++++++++--------------- CMakeLists.txt | 22 +++++++++++++++++-- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci-industrial.yml b/.github/workflows/ci-industrial.yml index bce8ef5..b670c03 100644 --- a/.github/workflows/ci-industrial.yml +++ b/.github/workflows/ci-industrial.yml @@ -43,21 +43,21 @@ jobs: - name: Go back to current directory run: cd $CURRENT_DIR - uses: actions/checkout@v3 # clone target repository - - name: Verify pigpio library install - run: sudo pigpiod -v + # - name: Verify pigpio library install + # run: sudo pigpiod -v - # - uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run - # with: - # path: ${{ env.CCACHE_DIR }} - # # This configuration will always create a new ccache cache starting off from the previous one (if any). - # # In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO - # # and might need some fine-tuning to match the use case - # key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}} - # restore-keys: | - # ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}- - # - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci - # env: # either pass all entries explicitly - # ROS_DISTRO: ${{ matrix.ROS_DISTRO }} - # ROS_REPO: ${{ matrix.ROS_REPO }} - # # with: # or pass the full matrix as config - # # config: ${{toJSON(matrix)}} + - uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run + with: + path: ${{ env.CCACHE_DIR }} + # This configuration will always create a new ccache cache starting off from the previous one (if any). + # In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO + # and might need some fine-tuning to match the use case + key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}} + restore-keys: | + ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}- + - uses: 'ros-industrial/industrial_ci@master' # run industrial_ci + env: # either pass all entries explicitly + ROS_DISTRO: ${{ matrix.ROS_DISTRO }} + ROS_REPO: ${{ matrix.ROS_REPO }} + # with: # or pass the full matrix as config + # config: ${{toJSON(matrix)}} diff --git a/CMakeLists.txt b/CMakeLists.txt index 5167491..a301346 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,8 +12,26 @@ find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) find_package(rclcpp_lifecycle REQUIRED) -find_library(PIGPIO_IF2_LIB pigpiod_if2 REQUIRED) -find_library(PIGPIO_LIB pigpio REQUIRED) +################################################################################ +### Find the pigpio shared libraries. +################################################################################ + +# Find the pigpio libraries. +find_library(PIGPIO_LIB + NAMES libpigpio.so + HINTS /usr/local/lib + REQUIRED) + +find_library(PIGPIO_IF2_LIB + NAMES libpigpiod_if2.so + HINTS /usr/local/lib + REQUIRED) + +################################################################################ +################################################################################ + +# find_library(PIGPIO_IF2_LIB pigpiod_if2 REQUIRED) +# find_library(PIGPIO_LIB pigpio REQUIRED) add_library( rpi_pwm_hardware_interface