[realsense2] Enable OpenNI2 driver option (#5275)

* [realsense2] Update to v2.18.0

Update realsense2 port to librealsense v2.18.0.

* [realsense2] Add OpenNI2 driver option

Add OpenNI2 driver option.

* [realsense2] Fix OpenNI2 driver option

* [realsense2] Remove unnecessary patch

* [realsense2] Bump CONTROL version
This commit is contained in:
Tsukasa Sugiura 2019-06-18 08:04:18 +09:00 committed by Victor Romero
parent 302c43f931
commit 5e9ccbc4a5
3 changed files with 43 additions and 8 deletions

View File

@ -1,8 +1,12 @@
Source: realsense2
Version: 2.22.0
Version: 2.22.0-1
Homepage: https://github.com/IntelRealSense/librealsense
Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300).
Feature: tools
Build-Depends: opengl
Description: Build Intel® RealSense™ examples and tools
Feature: openni2
Build-Depends: openni2
Description: Build Intel® RealSense™ OpenNI2 driver

View File

@ -0,0 +1,18 @@
diff --git a/wrappers/openni2/CMakeLists.txt b/wrappers/openni2/CMakeLists.txt
index 0eee84c2..769e67ff 100755
--- a/wrappers/openni2/CMakeLists.txt
+++ b/wrappers/openni2/CMakeLists.txt
@@ -6,12 +6,7 @@ set(OPENNI2_DIR "c:/Program Files/OpenNI2" CACHE FILEPATH "OpenNI2 SDK directory
set(REALSENSE2_DIR "c:/Program Files (x86)/Intel RealSense SDK 2.0" CACHE FILEPATH "RealSense2 SDK directory")
# INCLUDE DIR
-if (UNIX)
- include_directories (${OPENNI2_DIR})
-else ()
- include_directories (${OPENNI2_DIR}/Include)
-endif ()
-
+include_directories (${OPENNI2_DIR})
include_directories (${REALSENSE2_DIR}/include)
include_directories (src)

View File

@ -6,15 +6,20 @@ vcpkg_from_github(
REF v2.22.0
SHA512 7595780c1955a2d4a91df5b70ab6366c672f389bc3d2dcb9f2e78a2ea1fc875c65f878103df483205e17f62dfd024ee5f7ccb15afc5d18978d3c25aa071652ab
HEAD_REF development
PATCHES
"fix_openni2.patch"
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE)
set(BUILD_EXAMPLES OFF)
set(BUILD_GRAPHICAL_EXAMPLES OFF)
set(BUILD_TOOLS OFF)
if("tools" IN_LIST FEATURES)
set(BUILD_EXAMPLES ON)
set(BUILD_GRAPHICAL_EXAMPLES ON)
set(BUILD_TOOLS ON)
endif()
set(BUILD_OPENNI2_BINDINGS OFF)
if(("openni2" IN_LIST FEATURES) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic"))
set(BUILD_OPENNI2_BINDINGS ON)
endif()
vcpkg_configure_cmake(
@ -26,9 +31,11 @@ vcpkg_configure_cmake(
-DBUILD_WITH_OPENMP=OFF
-DBUILD_UNIT_TESTS=OFF
-DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE}
-DBUILD_OPENNI2_BINDINGS=${BUILD_OPENNI2_BINDINGS}
-DOPENNI2_DIR=${CURRENT_INSTALLED_DIR}/include/openni2
OPTIONS_RELEASE
-DBUILD_EXAMPLES=${BUILD_EXAMPLES}
-DBUILD_GRAPHICAL_EXAMPLES=${BUILD_GRAPHICAL_EXAMPLES}
-DBUILD_EXAMPLES=${BUILD_TOOLS}
-DBUILD_GRAPHICAL_EXAMPLES=${BUILD_TOOLS}
OPTIONS_DEBUG
-DBUILD_EXAMPLES=OFF
-DBUILD_GRAPHICAL_EXAMPLES=OFF
@ -44,7 +51,7 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(BUILD_EXAMPLES)
if(BUILD_TOOLS)
file(GLOB EXEFILES_RELEASE
${CURRENT_PACKAGES_DIR}/bin/rs-*
${CURRENT_PACKAGES_DIR}/bin/realsense-*
@ -63,5 +70,11 @@ if(BUILD_EXAMPLES)
endif()
endif()
if(BUILD_OPENNI2_BINDINGS)
file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/_out/rs2driver*
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers)
endif()
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/realsense2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/realsense2/LICENSE ${CURRENT_PACKAGES_DIR}/share/realsense2/copyright)