Skip to content

Commit 8f6891e

Browse files
Merge branch 'main' into foxy
2 parents 713155a + 7e72ce3 commit 8f6891e

File tree

4 files changed

+28
-49
lines changed

4 files changed

+28
-49
lines changed

.github/workflows/foxy-binary-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
ros-foxy-robot-state-publisher
4141
- name: Build and run tests
4242
id: action-ros-ci
43-
uses: ros-tooling/action-ros-ci@v0.2
43+
uses: ros-tooling/action-ros-ci@v0.3
4444
with:
4545
target-ros2-distro: ${{ env.ROS_DISTRO }}
4646
package-name: |

.github/workflows/foxy-source-build.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Flexiv ROS 2
22

3-
[![Foxy Source Build](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-source-build.yml/badge.svg)](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-source-build.yml)
43
[![Foxy Binary Build](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-binary-build.yml/badge.svg?branch=foxy)](https://github.com/flexivrobotics/flexiv_ros2/actions/workflows/foxy-binary-build.yml)
54
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
65

flexiv_hardware/CMakeLists.txt

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1010
add_compile_options(-Wall -Wextra -Wpedantic)
1111
endif()
1212

13-
option(BUILD_FOR_ARM64 "Link to RDK library for arm64 processor, otherwise link to x64" OFF)
14-
1513
# find dependencies
1614
find_package(ament_cmake REQUIRED)
1715
find_package(rclcpp REQUIRED)
@@ -31,15 +29,35 @@ target_include_directories(
3129
${CMAKE_CURRENT_SOURCE_DIR}/rdk/include
3230
)
3331

34-
# Link arm64 or x64 version of libFlexivRdk
35-
if (${BUILD_FOR_ARM64})
36-
target_link_libraries(${PROJECT_NAME}
37-
${CMAKE_CURRENT_SOURCE_DIR}/rdk/lib/libFlexivRdk.arm64-darwin.a)
38-
else()
39-
target_link_libraries(${PROJECT_NAME}
40-
${CMAKE_CURRENT_SOURCE_DIR}/rdk/lib/libFlexivRdk.x86_64-linux-gnu.a)
32+
# Set static library
33+
message("OS: ${CMAKE_SYSTEM_NAME}")
34+
message("Processor: ${CMAKE_SYSTEM_PROCESSOR}")
35+
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
36+
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
37+
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/rdk/lib/libFlexivRdk.x86_64-linux-gnu.a")
38+
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64")
39+
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/rdk/lib/libFlexivRdk.aarch64-linux-gnu.a")
40+
else()
41+
message(FATAL_ERROR "Linux with ${CMAKE_SYSTEM_PROCESSOR} processor is currently not supported.")
42+
endif()
43+
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
44+
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64")
45+
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/rdk/lib/libFlexivRdk.arm64-darwin.a")
46+
else()
47+
message(FATAL_ERROR "Mac with ${CMAKE_SYSTEM_PROCESSOR} processor is currently not supported.")
48+
endif()
49+
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
50+
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "AMD64")
51+
set(RDK_STATIC_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/rdk/lib/FlexivRdk.win_amd64.lib")
52+
else()
53+
message(FATAL_ERROR "Windows with ${CMAKE_SYSTEM_PROCESSOR} processor is currently not supported.")
54+
endif()
4155
endif()
4256

57+
target_link_libraries(${PROJECT_NAME}
58+
${RDK_STATIC_LIBRARY}
59+
)
60+
4361
# Link ROS packages
4462
ament_target_dependencies(
4563
${PROJECT_NAME}

0 commit comments

Comments
 (0)