Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Fix: use include src/CMakeLists.txt strategy for integrating mp-units.
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed Nov 17, 2023
1 parent cf3a966 commit d1eb073
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ros2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ jobs:
make -j8
sudo make install
- name: Install mp-units
run: |
git clone https://github.com/mpusz/mp-units && cd mp-units
mkdir build && cd build
cmake -DMP_UNITS_AS_SYSTEM_HEADERS=ON -DMP_UNITS_BUILD_LA=OFF ..
make -j8
sudo make install
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distro }}
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "external/107-Arduino-Cyphal"]
path = external/107-Arduino-Cyphal
url = https://github.com/107-systems/107-Arduino-Cyphal
[submodule "external/mp-units"]
path = external/mp-units
url = https://github.com/mpusz/mp-units
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ endif()
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(mp-units REQUIRED)
##########################################################################
add_subdirectory(external/107-Arduino-Cyphal)
add_subdirectory(external/libsocketcan)
add_subdirectory(external/mp-units/src)
#######################################################################################
include_directories(
include
Expand All @@ -27,11 +27,11 @@ add_executable(${T07_ROBOT_TARGET}
)
#######################################################################################
target_link_libraries(${T07_ROBOT_TARGET}
cyphal++ socketcan
cyphal++ socketcan mp-units
)
#######################################################################################
target_compile_features(${T07_ROBOT_TARGET} PRIVATE cxx_std_20)
ament_target_dependencies(${T07_ROBOT_TARGET} rclcpp std_msgs mp-units)
ament_target_dependencies(${T07_ROBOT_TARGET} rclcpp std_msgs)
#######################################################################################
install(TARGETS
${T07_ROBOT_TARGET}
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,3 @@ cmake -DFMT_TEST=OFF ..
make -j8
sudo make install
```
* Install `mp-units`
```bash
git clone https://github.com/mpusz/mp-units && cd mp-units
mkdir build && cd build
cmake -DMP_UNITS_AS_SYSTEM_HEADERS=ON -DMP_UNITS_BUILD_LA=OFF ..
make -j8
sudo make install
```
1 change: 1 addition & 0 deletions external/mp-units
Submodule mp-units added at 80129b

0 comments on commit d1eb073

Please sign in to comment.