Fix upstream versions to enable patches to always apply

This commit is contained in:
Matt Spencer
2026-07-31 17:49:20 +00:00
parent 93e9291e19
commit 44e039beac
4 changed files with 91 additions and 95 deletions
+22 -47
View File
@@ -1,49 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05f84c5..4fb6f31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,9 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(livox_sdk2)
+find_package(ament_cmake REQUIRED)
diff --git a/package.xml b/package.xml
new file mode 100644
index 0000000..ffdf3ce
--- /dev/null
+++ b/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="3">
+ <name>livox_sdk2</name>
+ <version>1.3.1</version>
+ <description>
+ Livox SDK2: official C++ library for Livox LiDAR sensors.
+ Provides the livox_sdk2 ament target consumed by livox_ros_driver2.
+ </description>
+ <maintainer email="sdk@livoxtech.com">Livox</maintainer>
+ <license>Apache-2.0</license>
+
set(CMAKE_CXX_STANDARD 11)
message(STATUS "main project dir: " ${PROJECT_SOURCE_DIR})
@@ -18,3 +20,9 @@ endif(UNIX)
add_subdirectory(sdk_core)
add_subdirectory(samples)
+ <buildtool_depend>ament_cmake</buildtool_depend>
+
+# Export the installed headers/libraries so ament packages (e.g. livox_ros_driver2)
+# find the SDK from the colcon install space via CMAKE_PREFIX_PATH.
+ament_export_include_directories(include)
+ament_export_libraries(livox_lidar_sdk_shared)
+ament_package()
diff --git a/sdk_core/comm/define.h b/sdk_core/comm/define.h
index 0872328..28d989b 100644
--- a/sdk_core/comm/define.h
+++ b/sdk_core/comm/define.h
@@ -31,6 +31,7 @@
#include <functional>
#include <vector>
#include <atomic>
+#include <cstdint>
#include "livox_lidar_def.h"
diff --git a/sdk_core/logger_handler/file_manager.h b/sdk_core/logger_handler/file_manager.h
index 242a431..14cd76a 100644
--- a/sdk_core/logger_handler/file_manager.h
+++ b/sdk_core/logger_handler/file_manager.h
@@ -28,6 +28,7 @@
#include <string>
#include <vector>
#include <map>
+#include <cstdint>
namespace livox {
namespace lidar {
+ <export>
+ <build_type>ament_cmake</build_type>
+ </export>
+</package>