From ae8f455aab96ceba2061cdb35d74ae85bd1d2740 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 27 Apr 2024 21:24:03 +0300 Subject: [PATCH] pangolin: add support for openni2 Requires #23790. --- recipes/pangolin/all/conan_deps.cmake | 2 +- recipes/pangolin/all/conanfile.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/pangolin/all/conan_deps.cmake b/recipes/pangolin/all/conan_deps.cmake index a7876222c7bf8..6bf5e6186255a 100644 --- a/recipes/pangolin/all/conan_deps.cmake +++ b/recipes/pangolin/all/conan_deps.cmake @@ -24,7 +24,7 @@ custom_find_package(libusb1) custom_find_package(Lz4) #custom_find_package(MediaFoundation) custom_find_package(OpenEXR) -#custom_find_package(OpenNI2) +custom_find_package(OpenNI2) #custom_find_package(Pleora) custom_find_package(PNG) custom_find_package(pybind11) diff --git a/recipes/pangolin/all/conanfile.py b/recipes/pangolin/all/conanfile.py index b9e96a3162412..cb8856027f476 100644 --- a/recipes/pangolin/all/conanfile.py +++ b/recipes/pangolin/all/conanfile.py @@ -34,6 +34,7 @@ class PangolinConan(ConanFile): "with_jpeg": [True, False], "with_lz4": [True, False], "with_openexr": [True, False], + "with_openni2": [True, False], "with_png": [True, False], "with_raw": [True, False], "with_realsense": [True, False], @@ -55,6 +56,7 @@ class PangolinConan(ConanFile): "with_jpeg": True, "with_lz4": False, "with_openexr": False, + "with_openni2": False, "with_png": True, "with_raw": False, "with_realsense": False, @@ -74,7 +76,7 @@ class PangolinConan(ConanFile): "with_jpeg": "Support JPEG image input", "with_lz4": "Support LZ4 compression", "with_openexr": "Support EXR image input", - # "with_openni2": "Support OpenNI2 video input", + "with_openni2": "Support OpenNI2 video input", # "with_pleora": "Support Pleora video input", "with_png": "Support PNG image input", "with_raw": "Support raw images", @@ -151,6 +153,8 @@ def requirements(self): self.requires("lz4/1.9.4") if self.options.with_openexr: self.requires("openexr/2.5.7") + if self.options.with_openni2: + self.requires("openni2/2.2.0.33") if self.options.with_png: self.requires("libpng/[>=1.6 <2]") if self.options.python_bindings: @@ -218,7 +222,7 @@ def generate(self): tc.variables["BUILD_PANGOLIN_LIBUVC"] = self.options.with_uvc tc.variables["BUILD_PANGOLIN_LZ4"] = self.options.with_lz4 tc.variables["BUILD_PANGOLIN_OPENNI"] = False - tc.variables["BUILD_PANGOLIN_OPENNI2"] = False + tc.variables["BUILD_PANGOLIN_OPENNI2"] = self.options.with_openni2 tc.variables["BUILD_PANGOLIN_PLEORA"] = False tc.variables["BUILD_PANGOLIN_PYTHON"] = self.options.python_bindings tc.variables["BUILD_PANGOLIN_REALSENSE"] = False @@ -242,10 +246,10 @@ def generate(self): deps.set_property("libusb", "cmake_file_name", "libusb1") deps.set_property("libuvc", "cmake_file_name", "uvc") deps.set_property("lz4", "cmake_file_name", "Lz4") + deps.set_property("openni2", "cmake_file_name", "OpenNI2") deps.set_property("tinyobjloader", "cmake_target_name", "tinyobj") # deps.set_property("depthsense", "cmake_file_name", "DepthSense") # deps.set_property("mediafoundation", "cmake_file_name", "MediaFoundation") - # deps.set_property("openni2", "cmake_file_name", "OpenNI2") # deps.set_property("pleora", "cmake_file_name", "Pleora") # deps.set_property("telicam", "cmake_file_name", "TeliCam") deps.generate() @@ -355,6 +359,8 @@ def _add_component(name, requires): pango_video.requires.append("libdc1394::libdc1394") if self.options.with_ffmpeg: pango_video.requires.extend(["ffmpeg::avcodec", "ffmpeg::avdevice", "ffmpeg::avformat", "ffmpeg::avutil"]) + if self.options.with_openni2: + pango_video.requires.append("openni2::openni2") if self.options.with_realsense: pango_video.requires.append("librealsense::librealsense") if self.options.with_uvc: