Skip to content

Commit

Permalink
pangolin: add support for openni2
Browse files Browse the repository at this point in the history
Requires #23790.
  • Loading branch information
valgur committed Apr 27, 2024
1 parent 07b54b2 commit ae8f455
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion recipes/pangolin/all/conan_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 9 additions & 3 deletions recipes/pangolin/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ae8f455

Please sign in to comment.