Skip to content

Commit 48367e2

Browse files
Add pcl 1.15.1
1 parent d034b32 commit 48367e2

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

recipes/pcl/all/conandata.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
sources:
2+
"1.15.1":
3+
url: https://github.com/PointCloudLibrary/pcl/archive/0dec791a676b23581f111c9d50ed3b375d3c8868.zip
4+
sha256: ba578a7355121cd6eb176e095483b3c9356d7554c834599e2c31cfd017948847
25
"1.13.1":
36
url: https://github.com/PointCloudLibrary/pcl/archive/refs/tags/pcl-1.13.1.tar.gz
47
sha256: 8ab98a9db371d822de0859084a375a74bdc7f31c96d674147710cf4101b79621

recipes/pcl/all/conanfile.py

+29-8
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class PclConan(ConanFile):
6565
"tools": [True, False],
6666
# Optional external dependencies.
6767
# Only used if the corresponding component is enabled.
68+
"with_cjson": [True, False],
6869
"with_cuda": [True, False],
6970
"with_flann": [True, False],
7071
"with_libusb": [True, False],
@@ -106,8 +107,8 @@ class PclConan(ConanFile):
106107
"keypoints": True,
107108
"ml": True,
108109
"octree": True,
109-
"outofcore": False,
110-
"people": False,
110+
"outofcore": True,
111+
"people": True,
111112
"recognition": True,
112113
"registration": True,
113114
"sample_consensus": True,
@@ -138,6 +139,7 @@ class PclConan(ConanFile):
138139
"apps": False,
139140
"tools": False,
140141
# Optional external dependencies
142+
"with_cjson": True,
141143
"with_cuda": False,
142144
"with_flann": True,
143145
"with_libusb": True,
@@ -205,6 +207,7 @@ def _ext_dep_to_conan_target(self, dep):
205207
return []
206208
return {
207209
"boost": ["boost::boost"],
210+
"cjson": ["cjson::cjson"] if Version(self.version) >= "1.15" else [],
208211
"cuda": [],
209212
"davidsdk": [],
210213
"dssdk": [],
@@ -337,6 +340,10 @@ def config_options(self):
337340
del self.options.fPIC
338341
if self.settings.arch not in ["x86", "x86_64"]:
339342
del self.options.use_sse
343+
if Version(self.version) < "1.15":
344+
del self.options.with_cjson
345+
self.options.outofcore = False
346+
self.options.people = False
340347

341348
def configure(self):
342349
if self.options.shared:
@@ -366,6 +373,9 @@ def _is_enabled(self, dep):
366373
return is_available and is_used
367374

368375
def requirements(self):
376+
# Boost 1.87 not usable because of deprecations
377+
# See https://www.boost.org/doc/libs/1_85_0/libs/filesystem/doc/deprecated.html
378+
# See https://github.com/PointCloudLibrary/pcl/issues/5881
369379
self.requires("boost/1.83.0", transitive_headers=True)
370380
self.requires("eigen/3.4.0", transitive_headers=True)
371381
if self._is_enabled("flann"):
@@ -375,11 +385,11 @@ def requirements(self):
375385
if self._is_enabled("qhull"):
376386
self.requires("qhull/8.0.1", transitive_headers=True)
377387
if self._is_enabled("qt"):
378-
self.requires("qt/6.6.1")
388+
self.requires("qt/6.7.3")
379389
if self._is_enabled("libusb"):
380390
self.requires("libusb/1.0.26", transitive_headers=True)
381391
if self._is_enabled("pcap"):
382-
self.requires("libpcap/1.10.4")
392+
self.requires("libpcap/1.10.5")
383393
if self._is_enabled("opengl"):
384394
# OpenGL is only used if VTK is available
385395
self.requires("opengl/system", transitive_headers=True)
@@ -390,9 +400,11 @@ def requirements(self):
390400
else:
391401
self.requires("mesa-glu/9.0.3", transitive_headers=True)
392402
if self._is_enabled("opencv"):
393-
self.requires("opencv/4.8.1", transitive_headers=True)
403+
self.requires("opencv/4.11.0", transitive_headers=True)
394404
if self._is_enabled("zlib"):
395405
self.requires("zlib/[>=1.2.11 <2]")
406+
if self._is_enabled("cjson"):
407+
self.requires("cjson/[~1]", transitive_headers=True)
396408
# TODO:
397409
# self.requires("vtk/9.x.x", transitive_headers=True)
398410
# self.requires("openni/x.x.x", transitive_headers=True)
@@ -464,7 +476,7 @@ def generate(self):
464476
tc.variables["OpenGL_GL_PREFERENCE"] = "GLVND"
465477

466478
if not self.options.add_build_type_postfix:
467-
tc.cache_variables["CMAKE_DEBUG_POSTFIX"] = ""
479+
tc.cache_variables["CMAKE_DEBUG_POSTFIX"] = ""
468480
tc.cache_variables["CMAKE_RELEASE_POSTFIX"] = ""
469481
tc.cache_variables["CMAKE_RELWITHDEBINFO_POSTFIX"] = ""
470482
tc.cache_variables["CMAKE_MINSIZEREL_POSTFIX"] = ""
@@ -486,7 +498,13 @@ def generate(self):
486498
tc.generate()
487499

488500
deps = CMakeDeps(self)
489-
deps.set_property("eigen", "cmake_file_name", "EIGEN")
501+
502+
if Version(self.version) < "1.15":
503+
deps.set_property("eigen", "cmake_file_name", "EIGEN")
504+
else:
505+
deps.set_property("eigen", "cmake_file_name", "Eigen3")
506+
deps.set_property("cjson", "cmake_target_name", "cJSON::cJSON")
507+
490508
deps.set_property("flann", "cmake_file_name", "FLANN")
491509
deps.set_property("flann", "cmake_target_name", "FLANN::FLANN")
492510
deps.set_property("libpcap", "cmake_file_name", "PCAP")
@@ -499,7 +517,10 @@ def generate(self):
499517

500518
def _patch_sources(self):
501519
apply_conandata_patches(self)
502-
for mod in ["Eigen", "FLANN", "GLEW", "Pcap", "Qhull", "libusb"]:
520+
mods = ["FLANN", "Pcap", "Qhull", "libusb"]
521+
if Version(self.version) < "1.15":
522+
mods.extend(["Eigen", "GLEW"])
523+
for mod in mods:
503524
os.remove(os.path.join(self.source_folder, "cmake", "Modules", f"Find{mod}.cmake"))
504525

505526
def build(self):

0 commit comments

Comments
 (0)