6cf51a3b67
Also add caching to the apt-get installs
56 lines
1.4 KiB
Diff
56 lines
1.4 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 7344d08..3d531a9 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -1,3 +1,9 @@
|
|
+# Default to the ROS2 build unless ROS1 is explicitly requested, so the else()
|
|
+# (ROS2) branch below is taken when ROS_EDITION is unset or set to "ROS2".
|
|
+if(NOT ROS_EDITION)
|
|
+ set(ROS_EDITION "ROS2")
|
|
+endif()
|
|
+
|
|
# judge which cmake codes to use
|
|
if(ROS_EDITION STREQUAL "ROS1")
|
|
|
|
@@ -191,6 +197,12 @@ else(ROS_EDITION STREQUAL "ROS2")
|
|
cmake_minimum_required(VERSION 3.14)
|
|
project(livox_ros_driver2)
|
|
|
|
+ # Fall back to the sourced ROS distro when -DDISTRO_ROS was not passed, so a
|
|
+ # plain `colcon build` behaves the same as the flagged Dockerfile build.
|
|
+ if(NOT DISTRO_ROS)
|
|
+ set(DISTRO_ROS "$ENV{ROS_DISTRO}")
|
|
+ endif()
|
|
+
|
|
# Default to C99
|
|
if(NOT CMAKE_C_STANDARD)
|
|
set(CMAKE_C_STANDARD 99)
|
|
diff --git a/launch b/launch
|
|
new file mode 120000
|
|
index 0000000..163fb01
|
|
--- /dev/null
|
|
+++ b/launch
|
|
@@ -0,0 +1 @@
|
|
+launch_ROS2
|
|
\ No newline at end of file
|
|
diff --git a/package.xml b/package.xml
|
|
new file mode 120000
|
|
index 0000000..36804a4
|
|
--- /dev/null
|
|
+++ b/package.xml
|
|
@@ -0,0 +1 @@
|
|
+package_ROS2.xml
|
|
\ No newline at end of file
|
|
diff --git a/package_ROS2.xml b/package_ROS2.xml
|
|
index 96f5762..c66785b 100644
|
|
--- a/package_ROS2.xml
|
|
+++ b/package_ROS2.xml
|
|
@@ -28,6 +28,7 @@
|
|
|
|
<depend>git</depend>
|
|
<depend>apr</depend>
|
|
+ <depend>livox_sdk2</depend>
|
|
|
|
<export>
|
|
<build_type>ament_cmake</build_type>
|