diff options
| -rw-r--r-- | 0001-adapt-GeographicLib-discovery-for-openEuler.patch | 20 | ||||
| -rw-r--r-- | robot-localization.spec | 4 |
2 files changed, 22 insertions, 2 deletions
diff --git a/0001-adapt-GeographicLib-discovery-for-openEuler.patch b/0001-adapt-GeographicLib-discovery-for-openEuler.patch new file mode 100644 index 0000000..0c9c43a --- /dev/null +++ b/0001-adapt-GeographicLib-discovery-for-openEuler.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a33326e..5eefb80 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,9 +34,12 @@ find_package(Eigen3 REQUIRED) + find_package(Boost REQUIRED) + find_package(yaml_cpp_vendor REQUIRED) + +-# Geographiclib installs FindGeographicLib.cmake to this non-standard location +-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/geographiclib/") +-find_package(GeographicLib REQUIRED) ++find_package(GeographicLib CONFIG QUIET) ++if(NOT GeographicLib_FOUND) ++ # GeographicLib may also be provided via a Find module on some distributions. ++ list(APPEND CMAKE_MODULE_PATH "/usr/share/cmake/geographiclib/") ++ find_package(GeographicLib REQUIRED) ++endif() + + set(library_name rl_lib) + diff --git a/robot-localization.spec b/robot-localization.spec index e5e0042..e434b74 100644 --- a/robot-localization.spec +++ b/robot-localization.spec @@ -17,6 +17,7 @@ Summary: Provides nonlinear state estimation through sensor fusion of an Url: http://ros.org/wiki/robot_localization License: Apache License 2.0 Source0: %{RosPkgName}-%{version}.tar.gz +Patch0: 0001-adapt-GeographicLib-discovery-for-openEuler.patch Requires: eigen3-devel Requires: ros-%{ros_distro}-geographic-msgs @@ -83,7 +84,7 @@ Provides: %{name}-runtime = %{version}-%{release} Provides nonlinear state estimation through sensor fusion of an abritrary number of sensors. %prep -%autosetup -n %{RosPkgName}-%{version} +%autosetup -n %{RosPkgName}-%{version} -p1 %build # Needed to bootstrap since the ros_workspace package does not yet exist. @@ -103,7 +104,6 @@ mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ - -DGeographicLib_DIR="%{_libdir}/cmake/GeographicLib" \ -DSETUPTOOLS_DEB_LAYOUT=OFF \ %if !0%{?with_tests} -DBUILD_TESTING=OFF \ |
