Locations PCLConfig.cmake and pcl-config.cmake files for PCL library - cmake

I installed PCL using the following commands.
sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all
When I compiled my PCL program with the following lines in CMakeLists.txt
find_package(PCL 1.3 REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
I have errors as
CMake Error at CMakeLists.txt:17 (find_package):
By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "PCL", but
CMake did not find one.
Could not find a package configuration file provided by "PCL" (requested
version 1.3) with any of the following names:
PCLConfig.cmake
pcl-config.cmake
Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
to a directory containing one of the above files. If "PCL" provides a
separate development package or SDK, be sure it has been installed.
I can't locate PCLConfig.cmake and pcl-config.cmake in my system.
I did like
locate PCLConfig.cmake
/home/ttt/.local/share/Trash/files/PCLConfig.cmake
/home/ttt/.local/share/Trash/files/DemoApplications-master/Calculus/tv_auto_on_off/voxel-sdk/libvoxelpcl/VoxelPCLConfig.cmake.in
/home/ttt/.local/share/Trash/files/config/VoxelPCLConfig.cmake.in
/home/ttt/.local/share/Trash/files/voxelsdk.2/config/VoxelPCLConfig.cmake.in
/home/ttt/.local/share/Trash/info/PCLConfig.cmake.trashinfo
/home/ttt/Softwares/voxelsdk/config/VoxelPCLConfig.cmake.in
/usr/lib/cmake/VoxelPCL/VoxelPCLConfig.cmake
Does it make sense?
I tried like
set(PCL_DIR "/home/ttt/.local/share/Trash/files/PCLConfig.cmake")
find_package(PCL 1.3 REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
But still have the same error.
How to locate PCLConfig.cmake in my system?
Thanks

you should specify the PCL dir for the CMake to find it.
In a terminal run :
$ locate PCLConfig.cmake
Then, add the found folder (without the filename) to your CMakeLists like the following :
set(PCL_DIR "/found/folder/")
#change X.x to whatever version yo installed
Sidenote : /usr/share/pcl-x.x is the usual path to your pcl folder.

I had the same problem when I followed the steps mentioned on the website http://www.pointclouds.org/downloads/linux.html, for Ubuntu 18.
You simply need to run
sudo apt install libpcl-dev
as bionic is not mentioned in the distributions (http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu/dists/)

Related

CMake to find a package configuration file provided by "gazebo", but CMake did not find one

I try build this khancyr/ardupilot_gazebo (github) plugin but I get this error after run sudo cmake ..
I use fedora35 so I cant run apt-get install libgazeboX-dev
what can I do for this problem ?
CMake Error at CMakeLists.txt:11 (find_package):
By not providing "Findgazebo.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "gazebo", but
CMake did not find one.
Could not find a package configuration file provided by "gazebo" with any
of the following names:
gazeboConfig.cmake
gazebo-config.cmake
Add the installation prefix of "gazebo" to CMAKE_PREFIX_PATH or set
"gazebo_DIR" to a directory containing one of the above files. If "gazebo"
provides a separate development package or SDK, be sure it has been
installed.
Have you tried running apt-get update && apt-get install ros-foxy-gazebo-ros-pkgs before running your command.

When I build someone else's code it says `Package Qt5Gui was not found in the pkg-config search path` but i installed it

I have installed Qt 5.1.4 but when I 'make install' it shows
Package Qt5Gui was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Gui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Gui' found
Package Qt5Widgets was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Widgets.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Widgets' found
Package Qt5Multimedia was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Multimedia.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Multimedia' found
But I installed this software qt-opensource-linux-x64-5.14.0.run, after I tried to find them I ran locate Qt5Gui but no Qt5Gui.pc returned,so how can i get Qt5*.pc on my ubuntu 20.04 ?
The installation I started was missing a few more packages
The complete installation should look like this
sudo apt install qtmultimedia5-dev qt5-default -y
The construction of the qt compilation environment requires more than the installation package downloaded from the official website
It worked for me !
Now i can find the Qt5*.pc !
You need to install qtbase5-dev which is part of qt5-default
see: https://packages.ubuntu.com/bionic/amd64/qtbase5-dev/filelist
EDIT: you may also have to install the package qtmultimedia5-dev.

include could not fined load file: CGAL_TBB_support

I'm trying to run "Triangulation_3" examples and while doing the "cmake" I get this error:
CMake Error at CMakeLists.txt:44 (include):
include could not find load file:
CGAL_TBB_support
I'm using ubuntu 20.04 and I've already installed TBB library using
sudo apt-get install libtbb-dev
How can I fix this error?
Thanks.
It seems you are using the system libcgal-dev version 5.0.3, as provided by apt for Ubuntu 20.04. That version of CGAL does not have the CMake module CGAL_TBB_support.cmake.
Probably you are using CGAL examples from more recent version of CGAL, maybe one you downloaded or cloned using Git.
If you recent version of CGAL is, for example, at the path /home/me/downloads/CGAL-5.3, then set the CMake cache variable CGAL_DIR to that directory. You can pass the option -DCGAL_DIR=/home/me/downloads/CGAL-5.3 to the cmake command line, for example. Or set the variable CGAL_DIR to /home/me/downloads/CGAL-5.3 in CMake-GUI. Of course, adjust you the real path on your system.

configure: error: Qtenv cannot find qmake in omnet++ installation

I'm trying to install omnetpp 5.2.1 on windows 10. But getting an error while doing ./configure command related to QT environment. I tried changing the configure.user file in omnetpp package to change the path of QT but still its not working. Here is the error:
configure:error: Qtenv cannot find qmake--maybe it is not in the path
or has some exotic name (tested names were: qmake qmake-qt5 qmake5)-
disabling Qtenv. You can try setting QT_PATH variable in
configure.user to a valid location.
qt5 might not be installed.
sudo apt install qt5-default worked for me while installing on Ubuntu 20.04.
OMNeT++ comes with all dependencies bundled. As long as you have executed the mingwenv.cmd and running from that shell, qmake should be available in the path (in tools/win64/mingw64/bin). Check if qmake.exe is present there. If not, make sure that ZIP file you have downloaded is intact. Standard windows unzip may fail on certain systems...
run ./configure WITH_QTENV = no

Why is no package 'mono' found?

Attempting to install Banshee from source on a CentOS 7 machine (migrating from Ubuntu and I want to retain my playlists and settings).
./configure results in:
configure: error: Package requirements (mono >= 2.4.3) were not met:
No package 'mono' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables MONO_MODULE_CFLAGS
and MONO_MODULE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
which mono
/bin/mono
echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig
but if I check for pkgconfig,
which pkgconfig
/usr/bin/which: no pkgconfig in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
yum provides pkgconfig
1:pkgconfig-0.27.1-4.el7.i686 : A tool for determining compilation options
Repo : base
yum install pkgconfig
Package 1:pkgconfig-0.27.1-4.el7.x86_64 already installed and latest version
A similar question was asked last year with no accepted answer. One of the answers pointed to a now non-existent page with a purported solution.
I believe pkg-config itself is working all right, configure is not complaining about that. What's missing is the entry for mono in the pkg-config database. Make sure you have mono.pc in /usr/local/lib/pkgconfig, or add wherever you have this file to PKG_CONFIG_PATH as instructed. On some linux distributions, development packages need to be separately installed, such as libmono-cil-dev on debian.