Comments (12)
Can you tell us how we could replicate this please?
from pcl.
This is probably due to the fact that geometry is a header only module that doesn't produce a binary library file.
Checking...
from pcl.
So apparently we don't handle the case where library is headers only for the generated pc files though we do it for the cmake.
Working on a fix.
from pcl.
@rbrusu I found a solution but I am not sure we want it pulled right now on PCL.
You can find it in my fork for now https://github.com/nizar-sallem/pcl.git then switch to "pkgconfig_fix" branch.
from pcl.
@nizar-sallem The branch is not on Github anymore, do you have some fix lying around?
from pcl.
For now the workaround we are using to get our pkg-config based build going is we manually create the file pcl_geometry-1.7.pc with these contents:
missing pkg-config file for pcl_geometry
prefix=/usr/local
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/pcl-1.7
Name: pcl_geometry
Description: Point cloud geometry library
Version: 1.7.0
Requires:
Libs:
Cflags: -I${includedir}
You can then put that somewhere in the pkg-config search path, like /usr/local/lib/pkgconfig/. Though to avoid hacking up your system you can just keep the file local to your project build directory and use this command in place of the vanilla pkg-config call in your makefiles:
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:. pkg-config
from pcl.
I ran into the same issue and fixed it this way so that the proper pkg-config file will always be built when you build from source:
I create a new macro in pcl_targets.cmake:
macro(PCL_MAKE_PKGCONFIG_HEADER_ONLY _name _component _desc _pcl_deps _ext_deps _int_deps _cflags)
set(PKG_NAME ${_name})
set(PKG_DESC ${_desc})
set(PKG_CFLAGS ${_cflags})
#set(PKG_LIBFLAGS ${_lib_flags})
LIST_TO_STRING(_ext_deps_str "${_ext_deps}")
set(PKG_EXTERNAL_DEPS ${_ext_deps_str})
foreach(_dep ${_pcl_deps})
set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}")
endforeach(_dep)
set(PKG_INTERNAL_DEPS "")
foreach(_dep ${_int_deps})
set(PKG_INTERNAL_DEPS "${PKG_INTERNAL_DEPS} -l${_dep}")
endforeach(_dep)
set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}.pc)
configure_file(${PROJECT_SOURCE_DIR}/cmake/pkgconfig-headeronly.cmake.in ${_pc_file} @ONLY)
install(FILES ${_pc_file} DESTINATION ${PKGCFG_INSTALL_DIR}
COMPONENT pcl_${_component})
endmacro(PCL_MAKE_PKGCONFIG_HEADER_ONLY)
I also added a file: pkgconfig-headeronly.cmake.in to the same directory. It looks like this:
# This file was generated by CMake for @PROJECT_NAME@ library @PKG_NAME@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@LIB_INSTALL_DIR@
#includedir=${prefix}/@INCLUDE_INSTALL_DIR@
includedir=${prefix}/include/@PROJECT_NAME_LOWER@-@PCL_MAJOR_VERSION@.@PCL_MINOR_VERSION@
Name: @PKG_NAME@
Description: @PKG_DESC@
Version: @PCL_VERSION@
Requires: @PKG_EXTERNAL_DEPS@
Libs:
Cflags: -I${includedir} @PKG_CFLAGS@
Then I called PCL_MAKE_PKGCONFIG_HEADER_ONLY from geometry/CMakeLists.txt. Works like a charm!
from pcl.
Great, that sounds like a fix that could be included in pcl to resolve this issue, not just a workaround. Thanks!
from pcl.
@jdt141 looking good, can you send it as a pull request, so we can merge it? Thanks!
from pcl.
+1 for a pull request.
from pcl.
Just submitted the request. HTH!
from pcl.
merged, thanks!
from pcl.
Related Issues (20)
- Is the gpu-accelerated VoxelGrid method unavailable in pcl 1.14.0 version? HOT 2
- [compile error] "PointXYZINormal not supported by visualization" HOT 1
- collect2: error: ld returned 1 exit status HOT 3
- error: ‘variate_generator’ is not a member of ‘std’ HOT 2
- error: texture is not a template HOT 2
- [Linker error] "Resolving Linker Errors when Using Custom Point Type with PCL's KdTree" HOT 1
- PCLVisualizer crash HOT 9
- Using PCL in QT Widget HOT 1
- [Cluster_Extraction] Trouble extracting clusters from Zivid pcd file HOT 2
- [request] PCL Concave hull & Convex hull HOT 6
- [SamplingSurfaceNormal]ERROR LNK2001 pcl::SamplingSurfaceNormal<struct pcl::PointXYZ>::applyFilter HOT 5
- [pcl_registration] ICP align broken in Release in new PCL version HOT 8
- [question] Corner detection Algorithm HOT 1
- [FastBilateralFilterOMP] FastBilateralFilterOMP does not support PointXYZI HOT 2
- [custom] error: macro "_mm512_srli_epi32" passed 3 arguments, but takes just 2 HOT 3
- There is a logic error in the code of the computeTransformation function in the gicp.hpp file when calculating the transformation matrix T HOT 5
- [convolution_3d.h] search :: the symbol on the left must be of a type HOT 4
- [visualize normal] Normals are displayed incorrectly HOT 19
- [=]] Provide a general summary of the issue HOT 1
- [custom] chatGPT code on pcl visualization : different behavior between pcl::visualization::PCLVisualizer::Ptr and pcl::visualization::PCLVisualizer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcl.