ros2 / rviz

ROS 3D Robot Visualizer
BSD 3-Clause Clear License
302 stars 213 forks source link

rviz_ogre_vendor hardcodes CMAKE_OSX_ARCHITECTURES to x86_64 failing build on Apple M1 architercture #697

Open kmamykin opened 3 years ago

kmamykin commented 3 years ago

This line: https://github.com/ros2/rviz/blob/94f6dd6958b2927a307893ff174f182dcc7afd0e/rviz_ogre_vendor/CMakeLists.txt#L123

I was able to make it build on Apple M1 by changing it to

list(APPEND extra_cmake_args "-DCMAKE_OSX_ARCHITECTURES='arm64'")

I propose changing the setting to -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 for APPLE to build a universal library.

kmamykin commented 3 years ago

Related https://github.com/ros2/rviz/issues/663