mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 09:07:47 +08:00
Windows CI: more sensor drivers + Windows/macOS bundle scripts
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
name: 'Install macOS Source Dependencies'
|
||||
description: 'Builds (and per-dependency caches) the source-only deps not available from Homebrew (GTSAM, libnabo+libpointmatcher, OrbbecSDK, depthai) and installs them into /usr/local.'
|
||||
inputs:
|
||||
os:
|
||||
description: 'Runner os label (e.g. matrix.os), used to namespace the per-dependency caches. Required because intel/arm produce different binaries with identical Homebrew version strings.'
|
||||
required: true
|
||||
build_type:
|
||||
description: 'CMake build type.'
|
||||
required: false
|
||||
default: 'Release'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Resolve dependency versions
|
||||
id: depver
|
||||
shell: bash
|
||||
# The source deps link against these Homebrew libraries and are compiled
|
||||
# with Xcode's toolchain, so both are folded into the cache keys: a
|
||||
# Homebrew bump (e.g. a new Eigen) or an Xcode update forces a rebuild.
|
||||
run: |
|
||||
BREW=$(brew list --versions eigen boost yaml-cpp | sort)
|
||||
XCODE=$(xcodebuild -version 2>/dev/null || clang --version | head -1)
|
||||
HASH=$(printf '%s\n%s\n' "$BREW" "$XCODE" | shasum | cut -d' ' -f1)
|
||||
echo "hash=$HASH" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# ----------------------------- GTSAM -----------------------------
|
||||
- name: Cache GTSAM
|
||||
id: cache-gtsam
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/deps-stage/gtsam
|
||||
key: gtsam-4.2.1-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/gtsam-4.2.1-eigen5.patch') }}-${{ steps.depver.outputs.hash }}
|
||||
|
||||
- name: Build GTSAM
|
||||
if: steps.cache-gtsam.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
NPROC=$(sysctl -n hw.logicalcpu)
|
||||
PATCHES="${{ github.action_path }}/patches"
|
||||
SRC="${{ runner.temp }}/src-deps/gtsam"
|
||||
STAGE="${{ runner.temp }}/deps-stage/gtsam"
|
||||
rm -rf "$SRC"; mkdir -p "$SRC" "$STAGE"
|
||||
git clone --depth 1 --branch 4.2.1 https://github.com/borglab/gtsam.git "$SRC/gtsam"
|
||||
cd "$SRC/gtsam"
|
||||
git apply "$PATCHES/gtsam-4.2.1-eigen5.patch"
|
||||
cmake -B build \
|
||||
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
|
||||
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
|
||||
-DGTSAM_WITH_TBB=OFF \
|
||||
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
|
||||
-DGTSAM_BUILD_TESTS=OFF \
|
||||
-DGTSAM_BUILD_UNSTABLE=OFF \
|
||||
-DGTSAM_USE_SYSTEM_EIGEN=ON \
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
cmake --build build -j$NPROC
|
||||
DESTDIR="$STAGE" cmake --install build
|
||||
|
||||
# ----------------- libnabo + libpointmatcher --------------------
|
||||
# Built together: libpointmatcher depends on libnabo, so keeping them in one
|
||||
# unit keeps the build order internal (lpm finds libnabo in the unit's stage).
|
||||
- name: Cache pointmatcher
|
||||
id: cache-pointmatcher
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/deps-stage/pointmatcher
|
||||
key: pointmatcher-nabo1.1.2-lpm1.4.4-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/libnabo-1.1.2.patch', '.github/actions/install-macos-source-deps/patches/libpointmatcher-1.4.4-boost.patch') }}-${{ steps.depver.outputs.hash }}
|
||||
|
||||
- name: Build pointmatcher
|
||||
if: steps.cache-pointmatcher.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
NPROC=$(sysctl -n hw.logicalcpu)
|
||||
PATCHES="${{ github.action_path }}/patches"
|
||||
SRC="${{ runner.temp }}/src-deps/pointmatcher"
|
||||
STAGE="${{ runner.temp }}/deps-stage/pointmatcher"
|
||||
rm -rf "$SRC"; mkdir -p "$SRC" "$STAGE"
|
||||
# libnabo (required by libpointmatcher)
|
||||
git clone --depth 1 --branch 1.1.2 https://github.com/ethz-asl/libnabo.git "$SRC/libnabo"
|
||||
cd "$SRC/libnabo"
|
||||
git apply "$PATCHES/libnabo-1.1.2.patch"
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=${{ inputs.build_type }}
|
||||
cmake --build build -j$NPROC
|
||||
DESTDIR="$STAGE" cmake --install build
|
||||
# libpointmatcher (finds libnabo from the unit's staged prefix)
|
||||
git clone --depth 1 --branch 1.4.4 https://github.com/ethz-asl/libpointmatcher.git "$SRC/libpointmatcher"
|
||||
cd "$SRC/libpointmatcher"
|
||||
git apply "$PATCHES/libpointmatcher-1.4.4-boost.patch"
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DCMAKE_PREFIX_PATH="$STAGE/usr/local" -DBUILD_EVALUATIONS=OFF -DBUILD_EXAMPLES=OFF
|
||||
cmake --build build -j$NPROC
|
||||
DESTDIR="$STAGE" cmake --install build
|
||||
|
||||
# ----------------------------- OrbbecSDK ------------------------
|
||||
- name: Cache OrbbecSDK
|
||||
id: cache-orbbec
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/deps-stage/orbbec
|
||||
key: orbbec-2.8.7-usrlocal-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/orbbecsdk-2.8.7-cmake-config-install.patch') }}-${{ steps.depver.outputs.hash }}
|
||||
|
||||
- name: Build OrbbecSDK
|
||||
if: steps.cache-orbbec.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
NPROC=$(sysctl -n hw.logicalcpu)
|
||||
PATCHES="${{ github.action_path }}/patches"
|
||||
SRC="${{ runner.temp }}/src-deps/orbbec"
|
||||
STAGE="${{ runner.temp }}/deps-stage/orbbec"
|
||||
rm -rf "$SRC"; mkdir -p "$SRC" "$STAGE"
|
||||
git clone --depth 1 --branch v2.8.7 https://github.com/orbbec/OrbbecSDK_v2.git "$SRC/OrbbecSDK_v2"
|
||||
cd "$SRC/OrbbecSDK_v2"
|
||||
git apply "$PATCHES/orbbecsdk-2.8.7-cmake-config-install.patch"
|
||||
# OrbbecSDK defaults its install prefix to /opt/OrbbecSDK; force /usr/local
|
||||
# so it stages under usr/local like the other deps and is installed/found.
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DCMAKE_INSTALL_PREFIX=/usr/local -DOB_BUILD_DOCS=OFF -DOB_BUILD_EXAMPLES=OFF -DOB_BUILD_TOOLS=OFF -DOB_INSTALL_EXAMPLES_SOURCE=OFF
|
||||
cmake --build build -j$NPROC
|
||||
DESTDIR="$STAGE" cmake --install build
|
||||
|
||||
# ----------------------------- depthai --------------------------
|
||||
- name: Cache depthai
|
||||
id: cache-depthai
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ runner.temp }}/deps-stage/depthai
|
||||
key: depthai-2.32.0-usrlocal-${{ inputs.os }}-${{ hashFiles('.github/actions/install-macos-source-deps/patches/depthai-2.32.0-hunter-macos.patch') }}-${{ steps.depver.outputs.hash }}
|
||||
|
||||
- name: Build depthai
|
||||
if: steps.cache-depthai.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
NPROC=$(sysctl -n hw.logicalcpu)
|
||||
PATCHES="${{ github.action_path }}/patches"
|
||||
SRC="${{ runner.temp }}/src-deps/depthai"
|
||||
STAGE="${{ runner.temp }}/deps-stage/depthai"
|
||||
rm -rf "$SRC"; mkdir -p "$SRC" "$STAGE"
|
||||
# depthai 2.32.0 (Hunter-based; v2 does NOT use vcpkg/CMake presets)
|
||||
git clone --depth 1 --branch v2.32.0 https://github.com/luxonis/depthai-core.git "$SRC/depthai-core"
|
||||
cd "$SRC/depthai-core"
|
||||
git submodule update --init --recursive
|
||||
# Route zlib to Homebrew: Hunter's pinned zlib fork has a classic
|
||||
# TARGET_OS_MAC fdopen block that won't compile against the modern macOS SDK.
|
||||
git apply "$PATCHES/depthai-2.32.0-hunter-macos.patch"
|
||||
# v2 and its old Hunter deps declare cmake_minimum_required < 3.5, which the
|
||||
# runner's CMake 4.x rejects, and CMAKE_POLICY_VERSION_MINIMUM does not
|
||||
# propagate into Hunter's sub-builds. Use a pinned CMake 3.x just for depthai
|
||||
# (Hunter reuses the same cmake binary for its dependency sub-builds).
|
||||
python3 -m venv "$SRC/cmake3-venv"
|
||||
"$SRC/cmake3-venv/bin/pip" install -q "cmake==3.31.6"
|
||||
CMAKE3="$SRC/cmake3-venv/bin/cmake"
|
||||
# DEPTHAI_ENABLE_CURL=OFF: Hunter's CURL drags in the broken zlib and also
|
||||
# fails to configure on this toolchain; rtabmap doesn't need depthai's CURL.
|
||||
# depthai-core defaults its install prefix to <build>/install; force
|
||||
# /usr/local so it stages under usr/local like the other deps.
|
||||
"$CMAKE3" -B build \
|
||||
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DDEPTHAI_ENABLE_CURL=OFF \
|
||||
-DDEPTHAI_BUILD_TESTS=OFF \
|
||||
-DDEPTHAI_BUILD_EXAMPLES=OFF \
|
||||
-DCMAKE_PREFIX_PATH="$(brew --prefix zlib)"
|
||||
"$CMAKE3" --build build -j$NPROC
|
||||
DESTDIR="$STAGE" "$CMAKE3" --install build
|
||||
|
||||
# ------------------- install all units into /usr/local ----------
|
||||
- name: Install source dependencies into /usr/local
|
||||
shell: bash
|
||||
# Copy each (cached or freshly built) staged tree into /usr/local so
|
||||
# rtabmap's find_package() and the bundle fixup (which search /usr/local)
|
||||
# pick them up. Runs on both cache hit and miss.
|
||||
run: |
|
||||
set -e
|
||||
STAGE="${{ runner.temp }}/deps-stage"
|
||||
found=0
|
||||
for unit in gtsam pointmatcher orbbec depthai; do
|
||||
if [ -d "$STAGE/$unit/usr/local" ]; then
|
||||
sudo cp -a "$STAGE/$unit/usr/local/." /usr/local/
|
||||
found=1
|
||||
fi
|
||||
done
|
||||
if [ "$found" != "1" ]; then
|
||||
echo "No staged source dependencies found under $STAGE" >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,41 @@
|
||||
diff --git a/cmake/depthaiDependencies.cmake b/cmake/depthaiDependencies.cmake
|
||||
index 6b0b44f98..672c26402 100644
|
||||
--- a/cmake/depthaiDependencies.cmake
|
||||
+++ b/cmake/depthaiDependencies.cmake
|
||||
@@ -17,7 +17,9 @@ else()
|
||||
hunter_add_package(FP16)
|
||||
hunter_add_package(libarchive-luxonis)
|
||||
hunter_add_package(spdlog)
|
||||
- hunter_add_package(ZLIB)
|
||||
+ # ZLIB: use the system/Homebrew copy instead of Hunter's (the old pinned
|
||||
+ # zlib fork fails to build against the modern macOS SDK). Found below via
|
||||
+ # the standard FindZLIB module, which provides the same ZLIB::ZLIB target.
|
||||
if(DEPTHAI_ENABLE_BACKWARD)
|
||||
hunter_add_package(Backward)
|
||||
endif()
|
||||
@@ -45,8 +47,23 @@ if(NOT CONFIG_MODE OR (CONFIG_MODE AND NOT DEPTHAI_SHARED_LIBS))
|
||||
# libarchive for firmware packages
|
||||
find_package(archive_static ${_QUIET} CONFIG REQUIRED)
|
||||
find_package(lzma ${_QUIET} CONFIG REQUIRED)
|
||||
- # ZLIB for compressing Apps
|
||||
- find_package(ZLIB CONFIG REQUIRED)
|
||||
+ # ZLIB for compressing Apps.
|
||||
+ # Use the system/Homebrew zlib directly instead of Hunter's: Hunter's pinned
|
||||
+ # zlib fork fails to build against the modern macOS SDK, and Hunter also
|
||||
+ # intercepts find_package(ZLIB) via its own FindZLIB on the module path, so
|
||||
+ # we locate it manually and expose the ZLIB::zlib target depthai expects.
|
||||
+ find_path(SYSTEM_ZLIB_INCLUDE_DIR NAMES zlib.h)
|
||||
+ find_library(SYSTEM_ZLIB_LIBRARY NAMES z)
|
||||
+ if(NOT SYSTEM_ZLIB_INCLUDE_DIR OR NOT SYSTEM_ZLIB_LIBRARY)
|
||||
+ message(FATAL_ERROR "System zlib not found (looked for zlib.h and libz). Install via: brew install zlib")
|
||||
+ endif()
|
||||
+ if(NOT TARGET ZLIB::zlib)
|
||||
+ add_library(ZLIB::zlib UNKNOWN IMPORTED)
|
||||
+ set_target_properties(ZLIB::zlib PROPERTIES
|
||||
+ IMPORTED_LOCATION "${SYSTEM_ZLIB_LIBRARY}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${SYSTEM_ZLIB_INCLUDE_DIR}"
|
||||
+ )
|
||||
+ endif()
|
||||
|
||||
# spdlog for library and device logging
|
||||
find_package(spdlog ${_QUIET} CONFIG REQUIRED)
|
||||
@@ -0,0 +1,83 @@
|
||||
diff --git a/cmake/HandleEigen.cmake b/cmake/HandleEigen.cmake
|
||||
index b3b4f66b6..651cd1009 100644
|
||||
--- a/cmake/HandleEigen.cmake
|
||||
+++ b/cmake/HandleEigen.cmake
|
||||
@@ -59,7 +59,12 @@ else()
|
||||
endif()
|
||||
|
||||
# Detect Eigen version:
|
||||
-set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/src/Core/util/Macros.h")
|
||||
+# Since Eigen 5.0.0 the version macros moved from Eigen/src/Core/util/Macros.h
|
||||
+# to a dedicated Eigen/Version header, so check the new location first.
|
||||
+set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/Version")
|
||||
+if (NOT EXISTS ${EIGEN_VER_H})
|
||||
+ set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/src/Core/util/Macros.h")
|
||||
+endif()
|
||||
if (EXISTS ${EIGEN_VER_H})
|
||||
file(READ "${EIGEN_VER_H}" STR_EIGEN_VERSION)
|
||||
|
||||
diff --git a/gtsam/base/Matrix.h b/gtsam/base/Matrix.h
|
||||
index cfedf6d8c..9c9771407 100644
|
||||
--- a/gtsam/base/Matrix.h
|
||||
+++ b/gtsam/base/Matrix.h
|
||||
@@ -54,7 +54,7 @@ using Matrix7##N = Eigen::Matrix<double, 7, N>; \
|
||||
using Matrix8##N = Eigen::Matrix<double, 8, N>; \
|
||||
using Matrix9##N = Eigen::Matrix<double, 9, N>; \
|
||||
static const Eigen::MatrixBase<Matrix##N>::IdentityReturnType I_##N##x##N = Matrix##N::Identity(); \
|
||||
-static const Eigen::MatrixBase<Matrix##N>::ConstantReturnType Z_##N##x##N = Matrix##N::Zero();
|
||||
+static const decltype(Matrix##N::Zero()) Z_##N##x##N = Matrix##N::Zero();
|
||||
|
||||
GTSAM_MAKE_MATRIX_DEFS(1)
|
||||
GTSAM_MAKE_MATRIX_DEFS(2)
|
||||
diff --git a/gtsam/base/Vector.h b/gtsam/base/Vector.h
|
||||
index f7923ff88..5410393f6 100644
|
||||
--- a/gtsam/base/Vector.h
|
||||
+++ b/gtsam/base/Vector.h
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <gtsam/global_includes.h>
|
||||
#include <Eigen/Core>
|
||||
+#include <cassert>
|
||||
#include <iosfwd>
|
||||
#include <list>
|
||||
|
||||
@@ -42,14 +43,14 @@ typedef Eigen::Matrix<double, 1, 1> Vector1;
|
||||
typedef Eigen::Vector2d Vector2;
|
||||
typedef Eigen::Vector3d Vector3;
|
||||
|
||||
-static const Eigen::MatrixBase<Vector2>::ConstantReturnType Z_2x1 = Vector2::Zero();
|
||||
-static const Eigen::MatrixBase<Vector3>::ConstantReturnType Z_3x1 = Vector3::Zero();
|
||||
+static const decltype(Vector2::Zero()) Z_2x1 = Vector2::Zero();
|
||||
+static const decltype(Vector3::Zero()) Z_3x1 = Vector3::Zero();
|
||||
|
||||
// Create handy typedefs and constants for vectors with N>3
|
||||
// VectorN and Z_Nx1, for N=1..9
|
||||
#define GTSAM_MAKE_VECTOR_DEFS(N) \
|
||||
using Vector##N = Eigen::Matrix<double, N, 1>; \
|
||||
- static const Eigen::MatrixBase<Vector##N>::ConstantReturnType Z_##N##x1 = Vector##N::Zero();
|
||||
+ static const decltype(Vector##N::Zero()) Z_##N##x1 = Vector##N::Zero();
|
||||
|
||||
GTSAM_MAKE_VECTOR_DEFS(4)
|
||||
GTSAM_MAKE_VECTOR_DEFS(5)
|
||||
diff --git a/gtsam/linear/iterative.h b/gtsam/linear/iterative.h
|
||||
index 22f65b8de..20a0c936e 100644
|
||||
--- a/gtsam/linear/iterative.h
|
||||
+++ b/gtsam/linear/iterative.h
|
||||
@@ -61,7 +61,7 @@ namespace gtsam {
|
||||
|
||||
/** Apply operator A'*e */
|
||||
Vector operator^(const Vector& e) const {
|
||||
- return A_ ^ e;
|
||||
+ return gtsam::operator^(A_, e);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,7 +71,7 @@ namespace gtsam {
|
||||
|
||||
/** gradient of objective function 0.5*|Ax-b_|^2 at x = A_'*(Ax-b_) */
|
||||
Vector gradient(const Vector& x) const {
|
||||
- return A() ^ (A() * x - b());
|
||||
+ return gtsam::operator^(A(), Vector(A() * x - b()));
|
||||
}
|
||||
|
||||
/** Apply operator A */
|
||||
@@ -0,0 +1,87 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a5f0c44..69340e4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -78,18 +78,18 @@ elseif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
-# enable C++11 support.
|
||||
+# enable C++14 support (required by recent Eigen versions).
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
if (MSVC)
|
||||
message(FATAL_ERROR "CMake version 3.1 or later is required to compile ${PROJECT_NAME} with Microsoft Visual C++")
|
||||
endif ()
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
- set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
|
||||
+ set (CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
|
||||
else ()
|
||||
- set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
|
||||
+ set (CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
|
||||
endif ()
|
||||
else ()
|
||||
- set (CMAKE_CXX_STANDARD 11)
|
||||
+ set (CMAKE_CXX_STANDARD 14)
|
||||
endif ()
|
||||
|
||||
#======================== External Dependencies ===============================
|
||||
diff --git a/experimental/kdtree_cpu.cpp b/experimental/kdtree_cpu.cpp
|
||||
index 302b672..d63fcd3 100644
|
||||
--- a/experimental/kdtree_cpu.cpp
|
||||
+++ b/experimental/kdtree_cpu.cpp
|
||||
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "nabo_experimental.h"
|
||||
#include "../nabo/index_heap.h"
|
||||
+#include <cassert>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <limits>
|
||||
diff --git a/nabo/kdtree_cpu.cpp b/nabo/kdtree_cpu.cpp
|
||||
index cb1f8d1..52a444f 100644
|
||||
--- a/nabo/kdtree_cpu.cpp
|
||||
+++ b/nabo/kdtree_cpu.cpp
|
||||
@@ -37,6 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <queue>
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
+#include <cassert>
|
||||
#ifdef HAVE_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
diff --git a/nabo/kdtree_opencl.cpp b/nabo/kdtree_opencl.cpp
|
||||
index 5a9fee2..fb1345f 100644
|
||||
--- a/nabo/kdtree_opencl.cpp
|
||||
+++ b/nabo/kdtree_opencl.cpp
|
||||
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "nabo_private.h"
|
||||
#include "index_heap.h"
|
||||
+#include <cassert>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
diff --git a/tests/knnshow.cpp b/tests/knnshow.cpp
|
||||
index 6f4d3fc..c612378 100644
|
||||
--- a/tests/knnshow.cpp
|
||||
+++ b/tests/knnshow.cpp
|
||||
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "nabo/nabo.h"
|
||||
+#include <cassert>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
diff --git a/tests/knnvalidate.cpp b/tests/knnvalidate.cpp
|
||||
index 2430249..2a7dcc4 100644
|
||||
--- a/tests/knnvalidate.cpp
|
||||
+++ b/tests/knnvalidate.cpp
|
||||
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "nabo/nabo.h"
|
||||
#include "helpers.h"
|
||||
//#include "experimental/nabo_experimental.h"
|
||||
+#include <cassert>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
@@ -0,0 +1,32 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9dabfd0..7b73418 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -128,9 +128,9 @@ endif()
|
||||
#--------------------
|
||||
# DEPENDENCY: boost
|
||||
#--------------------
|
||||
-find_package(Boost REQUIRED COMPONENTS thread system program_options date_time)
|
||||
+find_package(Boost REQUIRED COMPONENTS thread program_options date_time)
|
||||
if (Boost_MINOR_VERSION GREATER 47)
|
||||
- find_package(Boost REQUIRED COMPONENTS thread system program_options date_time chrono)
|
||||
+ find_package(Boost REQUIRED COMPONENTS thread program_options date_time chrono)
|
||||
endif ()
|
||||
|
||||
#--------------------
|
||||
diff --git a/libpointmatcherConfig.cmake.in b/libpointmatcherConfig.cmake.in
|
||||
index 6de2c85..7c887fd 100644
|
||||
--- a/libpointmatcherConfig.cmake.in
|
||||
+++ b/libpointmatcherConfig.cmake.in
|
||||
@@ -7,9 +7,9 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(libnabo REQUIRED)
|
||||
find_dependency(yaml-cpp REQUIRED)
|
||||
-find_package(Boost COMPONENTS thread system program_options date_time REQUIRED)
|
||||
+find_package(Boost COMPONENTS thread program_options date_time REQUIRED)
|
||||
if (Boost_MINOR_VERSION GREATER 47)
|
||||
- find_package(Boost COMPONENTS thread system program_options date_time chrono REQUIRED)
|
||||
+ find_package(Boost COMPONENTS thread program_options date_time chrono REQUIRED)
|
||||
endif ()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/libpointmatcher-config.cmake)
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 261f2cda..644e068f 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -92,17 +92,20 @@ if(OB_IS_MAIN_PROJECT)
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/generated/Export.h" DESTINATION include/libobsensor/h)
|
||||
- install(EXPORT ${OB_SDK_LIB_NAME}Config NAMESPACE ob:: DESTINATION lib)
|
||||
+ install(EXPORT ${OB_SDK_LIB_NAME}Config NAMESPACE ob:: DESTINATION lib/cmake/${OB_SDK_LIB_NAME})
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
+ # Name the version file <pkg>ConfigVersion.cmake (not <pkg>Version.cmake) and
|
||||
+ # install it next to the config in lib/cmake/<pkg>, so find_package(OrbbecSDK)
|
||||
+ # discovers it in config mode and reads its version.
|
||||
write_basic_package_version_file(
|
||||
- "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}Version.cmake"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}ConfigVersion.cmake"
|
||||
VERSION "${PROJECT_VERSION}"
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
install(
|
||||
- FILES "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}Version.cmake"
|
||||
- DESTINATION lib
|
||||
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/${OB_SDK_LIB_NAME}ConfigVersion.cmake"
|
||||
+ DESTINATION lib/cmake/${OB_SDK_LIB_NAME}
|
||||
)
|
||||
if(MSVC)
|
||||
install(FILES $<TARGET_PDB_FILE:${OB_SDK_LIB_NAME}> DESTINATION bin OPTIONAL)
|
||||
Reference in New Issue
Block a user