PCL is a very useful computer vision library https://github.com/PointCloudLibrary/pcl, and building PCL from source on windows is very difficult most of the times. It would be very helpful to have this in vcpkg.
@UnaNancyOwen would you be able to modify your Windows pre-built work to support this?
In general configuration, the PCL requires these dependent libraries.
But, The some libraries (FLANN, QHull, OpenNI2) are not included in vcpkg yet.
First, the vcpkg should be support these libraries for build PCL.
@jasjuang Is there anything I can do to help?
@UnaNancyOwen I saw two pull requests for FLANN and QHull which should be merged anytime soon. That means only OpenNI2 is left. Would you be able to add OpenNI2 to vcpkg and then add PCL? I am still investigating on how to use the vcpkg api to create a package so I can contribute to the other open source libraries that I can successfully build on Windows.
@jasjuang Yes, I'll work on it, after those libraries have been added to vcpkg.
FLANN and QHull able to be installed using #1263 without problems.
# success
vcpkg install flann:x64-windows-static
# success
vcpkg install qhull:x64-windows-static
But, VTK installation will fail, because building Qt5 has failed.
Qt5 is dependency library that specified in VTK package.
Do you know something about it?
# failed
# This command is called in install VTK package. (vcpkg install vtk:x64-windows-static)
# But, the following error will be displayed and package install process has failed.
# Error: Building package qt5:x64-windows-static failed with: BUILD_FAILED
vcpkg install qt5:x64-windows-static
BTW:
Do you know how to switch toolset?
Visual Studio 2017 (vc141) and Visual Studio 2015 (vc140) are installed in my environment.
vcpkg is using Visual Studio 2017 (vc141) by default.
@UnaNancyOwen I ran into problems when installing vtk but #739 solves it for me, but I believe I am building the shared version because I ran vcpkg install qt5:x64-windows instead of vcpkg install qt5:x64-windows-static. Is there a reason why you prefer the static version?
@jasjuang Thanks, I will try with dynamic version.
I was trying to add PCL port, but vtk fails in vs 2017 :(
@mmazat Are you be able to build VTK from source? I checked the issues at VTK and it seems that no one reported any compilation problems in VS 2017
@jasjuang vtk7.1 with vs 2015 had no problem for me, I'm trying vtk7.1 +vs 2017 now, but it should be fine
yeap I just checked and vtk7.1 builds with no problem by vs 2017
I sent a pull-request (#1283) that including temporary changes.
vcpkg install pcl:x64-windows
But, It have still some problems.
[x] Some modules require C++ version (flann_cpp) of FLANN.
But, the current FLANN port does not install it.
@mmazat Do you know how to solve?
[x] PCL need add OpenNI2 port to vcpkg for support OpenNI2 grabber.
[ ] VTK port fails to install when choose static-link version, because building Qt5 has failed.
# failed
vcpkg install vtk:x64-windows-static
the FLANN port I am using:
https://github.com/seanlis/vcpkg/tree/master/ports/flann
It added building of flann_cpp.
@seanlis Thanks, It is amazing! :)
I confirmed that flann_cpp will be generated and installed.
Please apply the following fix in order to remove unnecessary files.
And, Please send a pull request.
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp.lib)
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_s.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/flann_cpp_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/flann_cpp_s.lib)
endif()
Fixed PR #1283 to build modules that require flann_cpp.
Please review it.
pcl_surface module require "qhullstatic.lib" on Windows.
But, the current QHull port does not install it.
It is necessary to fix QHull port.
find_package( PCL ) always detect debug libraries of FLANN and QHull.
It is necessary to fix this problem.
PCLConfig.cmake
# FLANN_LIBRAY should be detect "lib/flann_cpp.lib".
# But, It detect "debug/lib/flann_cpp.lib".
find_library(FLANN_LIBRARY
NAMES flann_cpp_s flann_cpp
HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
PATHS "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9"
"$ENV{PROGRAMFILES}/flann" "$ENV{PROGRAMW6432}/flann"
PATH_SUFFIXES lib)
# QHULL_LIBRAY should be detect "lib/qhullstatic.lib".
# But, It detect "debug/lib/qhullstatic.lib".
find_library(QHULL_LIBRARY
NAMES "qhullstatic.lib"
HINTS "${QHULL_ROOT}" "$ENV{QHULL_ROOT}"
PATHS "$ENV{PROGRAMFILES}/qhull" "$ENV{PROGRAMW6432}/qhull"
PATH_SUFFIXES project build bin lib)

Right now, as a workaround, you have to add -DCMAKE_BUILD_TYPE=Release to cmake in order to detect the release version.
I sent a pull-request (#1309) that add OpenNI2 port.
It is first version for add OpenNI2.
Please review it. (Most probably, I think It is included the some bugs.)
PCL port (#1283) supported OpenNI2.
The almost all of the main problems has been fixed.
I think the PCL port will be ready to merge after your review.
@jasjuang @seanlis Please review it.
The remaining problems is about other ports.
That problems is following.
pcl_surface module require "qhullstatic.lib" on Windows.
But, the current QHull port does not install it.
I resolved this problem. (#1329)
VTK port fails to install when choose static-link version, because building Qt5 has failed.
Thanks,
Probably, the PCL 1.8.1 release is coming soon.
In that case, The patch that the PCL port should apply is minimized. (1635.patch~1856.patch can remove from this port.)
And, It's not necessary to remove pcl_2d_release/debug.dll, because It's not generated in this version.
These make the port to very simple. Also, The port maintenance will be easy in future.
Do you think we should wait for a while?
@UnaNancyOwen When is 1.8.1 coming out? I think a lot of people will like to have 1.8.0. We can always update it to 1.8.1 when it comes out. I will review #1283 as soon as possible.
@jasjuang Please look at the PCL 1.8.1 milestone.
All major issues are closed.
The release date is not specified, but I think PCL 1.8.1 will be released soon (maybe).
It seems difficult to support static triplet of the Qt port (#513).
We should be consider that removing Qt option from the VTK port.
If it is not possible, the PCL port can't support static triplet.
@albertziegenhagel Hi. Do you need Qt option in VTK?
Yes, I actually do need Qt support in VTK. I usually build everything as shared libraries, so there was no problem on my system.
I don't know whether deactivating dependencies is the right thing to do here. I think Qt should actually be fixed to work as static library. Of course feature packages #1205 would come in handy here.
PCL 1.8.1 RC1 has been released.
I updated the PCL port to PCL 1.8.1 RC1 from PCL 1.8.0.
Please review it.
I will update this port to PCL 1.8.1 from PCL 1.8.1 RC when PCL 1.8.1 is officially released.
I think that this port ready to merge at that time.
Thanks,
@UnaNancyOwen ΠΏΡΠΈΠΌΠ΅Π½ΠΈΡΠ΅ ΠΈΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΡΠΎΠ²Π΅ΡΡΡΠ΅ Ρ ΡΠ΅Π±Ρ https://github.com/Microsoft/vcpkg/issues/1430
Ρ ΠΌΠ΅Π½Ρ Π½Π° shared x86 VTK ΡΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡΠΎΠ²Π°Π»ΡΡ Ρ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠΎΠΉ QT
Π΅ΡΠ»ΠΈ Π²ΡΠ΅ ΠΎΠΊ, ΠΏΠΎΠΆΠ½ΠΎ ΠΎΡΠΎΡΠΌΠ»ΡΡΡ ΠΏΠ°ΡΡΠ΅ΠΌ, ΠΊ ΡΠΎΠΆΠ°Π»Π΅Π½ΠΈΡ Ρ ΡΠ°ΠΌ Π΅ΡΠ΅ Π½Π΅ ΡΠ°Π·ΠΎΠ±ΡΠ°Π»ΡΡ Ρ git
apply the hotfix and check host https://github.com/Microsoft/vcpkg/issues/1430
I have a shared 86 VTK skompilirovalsja with support for QT
If everything is OK, dine arrange patch, unfortunately I myself haven't figured out with git
PCL port has been merged. Please close this issue.
If you found problems, Please open new issues.
Thanks,
Thanks a lot for the great work. I will report back if there issue with the port.
Most helpful comment
@jasjuang Yes, I'll work on it, after those libraries have been added to vcpkg.