Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make C++ language requirements optional #315

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/workflows/colcon-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ on: [push, pull_request]
jobs:
# build on Ubuntu docker images
build_linux:
name: "Ubuntu (${{ matrix.ros_distribution }}, shared: ${{ matrix.cmake_shared_libs }})"
name: "Ubuntu (${{ matrix.ros_distribution }})"

runs-on: ubuntu-latest

strategy:
matrix:
ros_distribution: [noetic, humble]
cmake_shared_libs: ['ON', 'OFF']
include:
- docker_image: ubuntu:20.04
ros_distribution: noetic
Expand Down Expand Up @@ -42,27 +41,24 @@ jobs:
with:
package-name: apriltag
target-ros1-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"

- name: ROS 2 CI Action
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/[email protected]
with:
package-name: apriltag
target-ros2-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"


# build on Windows native
build_windows:
name: "Windows (${{ matrix.ros_distribution }}, shared: ${{ matrix.cmake_shared_libs }})"
name: "Windows (${{ matrix.ros_distribution }})"

runs-on: windows-2019

strategy:
matrix:
ros_distribution: [noetic, humble]
cmake_shared_libs: ['ON', 'OFF']
include:
- ros_distribution: noetic
ros_version: 1
Expand All @@ -84,26 +80,23 @@ jobs:
with:
package-name: apriltag
target-ros1-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"

- name: ROS 2 CI Action
if: ${{ matrix.ros_version == 2 }}
uses: ros-tooling/[email protected]
with:
package-name: apriltag
target-ros2-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"

# build on macOS native
build_macos:
name: "macOS (${{ matrix.ros_distribution }}, shared: ${{ matrix.cmake_shared_libs }})"
name: "macOS (${{ matrix.ros_distribution }})"

runs-on: macos-latest

strategy:
matrix:
ros_distribution: [humble]
cmake_shared_libs: ['ON', 'OFF']

steps:
- uses: actions/checkout@v4
Expand All @@ -122,4 +115,3 @@ jobs:
with:
package-name: apriltag
target-ros2-distro: ${{ matrix.ros_distribution }}
extra-cmake-args: "-DBUILD_SHARED_LIBS=${{ matrix.cmake_shared_libs }}"
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(apriltag VERSION 3.3.0 LANGUAGES C CXX)
project(apriltag VERSION 3.3.0 LANGUAGES C)

if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
Expand Down Expand Up @@ -192,6 +192,7 @@ if (BUILD_EXAMPLES)
set(_OpenCV_REQUIRED_COMPONENTS core imgproc videoio highgui)
find_package(OpenCV COMPONENTS ${_OpenCV_REQUIRED_COMPONENTS} QUIET CONFIG)
if(OpenCV_FOUND)
enable_language(CXX)
# NB: contrib required for TickMeter in OpenCV 2.4. This is only required for 16.04 backwards compatibility and can be removed in the future.
# If we add it to the find_package initially, the demo won't build for newer OpenCV versions
if(OpenCV_VERSION VERSION_LESS "3.0.0")
Expand Down
File renamed without changes.
Loading