Skip to content

Commit

Permalink
[realsense2] Add OpenNI2 driver option
Browse files Browse the repository at this point in the history
Add OpenNI2 driver option.
  • Loading branch information
UnaNancyOwen committed Feb 1, 2019
1 parent 99f3c21 commit 843ab91
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ports/realsense2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Source: realsense2
Version: 2.18.0-1
Version: 2.18.0-2
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
11 changes: 11 additions & 0 deletions ports/realsense2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ if("tools" IN_LIST FEATURES)
set(BUILD_GRAPHICAL_EXAMPLES ON)
endif()

set(BUILD_OPENNI2_BINDINGS OFF)
if(("openni2" IN_LIST FEATURES) AND (BUILD_LIBRARY_LINKAGE MATCHES "dynamic"))
set(BUILD_OPENNI2_BINDINGS ON)
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
Expand All @@ -29,6 +34,7 @@ vcpkg_configure_cmake(
-DBUILD_EXAMPLES=${BUILD_EXAMPLES}
-DBUILD_GRAPHICAL_EXAMPLES=${BUILD_GRAPHICAL_EXAMPLES}
-DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE}
-DBUILD_OPENNI2_BINDINGS=${BUILD_OPENNI2_BINDINGS}
-DBUILD_UNIT_TESTS=OFF
-DBUILD_WITH_OPENMP=OFF
-DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE}
Expand All @@ -37,6 +43,7 @@ vcpkg_configure_cmake(
# BUILD
-DBUILD_EXAMPLES=OFF
-DBUILD_GRAPHICAL_EXAMPLES=OFF
-DBUILD_OPENNI2_BINDINGS=OFF
# CMAKE
"-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
-DCMAKE_DEBUG_POSTFIX="_d"
Expand All @@ -57,5 +64,9 @@ if(BUILD_EXAMPLES)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/realsense2)
endif()

if(BUILD_OPENNI2_BINDINGS)
file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/_out/Release/rs2driver.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2)
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)

0 comments on commit 843ab91

Please sign in to comment.