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

Humble arm compatability #224

Merged
merged 4 commits into from
May 8, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <rclcpp/rclcpp.hpp>
#include <functional>
#include <std_msgs/msg/string.hpp>
#include <std_srvs/srv/empty.hpp>

#include <carma_ros2_utils/carma_lifecycle_node.hpp>

Expand Down
12 changes: 8 additions & 4 deletions carma-messenger-core/lib_asn1c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,25 @@ if(${ROS_VERSION} EQUAL 1) # ROS 1

catkin_package()

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
install(FILES third_party_lib/libasn1c_x64.so DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RENAME libasn1c.so)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
install(FILES third_party_lib/libasn1c_x86.so DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RENAME libasn1c.so)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
install(FILES third_party_lib/libasn1c_arm64.so DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RENAME libasn1c.so)
endif()

else() # ROS2

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
install(FILES third_party_lib/libasn1c_x64.so DESTINATION lib RENAME libasn1c.so)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
install(FILES third_party_lib/libasn1c_x86.so DESTINATION lib RENAME libasn1c.so)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
install(FILES third_party_lib/libasn1c_arm64.so DESTINATION lib RENAME libasn1c.so)
endif()

ament_auto_package()
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@ Note: In order to use m32 flag, you should have the package libc6-dev-i386 ready

Copy the new generated shared libraries in your Workspace.

Paste and replace the old libraries in this folder.
Paste and replace the old libraries in this folder.

## To build on ARM, follow the same instructions but for the final build only run:

gcc -DPDU=MessageFrame -shared -o libasn1c_arm64.so -I./include/ ./src/*.c -fPIC
Loading