Posted by: sirivy | October 12, 2012

Could not find module FindPCL.cmake

After I install PCL and try to run a simple PCL project, I got this error message when I run “cmake”:

CMake Error at CMakeLists.txt:6 (find_package):
Could not find module FindPCL.cmake or a configuration file for package

Adjust CMAKE_MODULE_PATH to find FindPCL.cmake or set PCL_DIR to the
directory containing a CMake configuration file for PCL.  The file will
have one of the following names:

— Configuring incomplete, errors occurred!


This error message occurs because we haven’t set PCL_DIR yet. I follow the suggestion in the error message for setting the PCL_DIR. To set PCL_DIR, I use cmake-gui by running a command:

  • cmake-gui .

in my project directory. You can see the figure below for setting up PCL_DIR.


The PCL_DIR is the folder that stores PCLConfig.cmake. Usually this file will be stored in the directory that you store your compiled PCL library. In this case, my complied PCL library directory is at /home/myusername/INSTALLERS/pcl-1.6.0rc1/release where the PCLConfig.cmake is stored. After you set PCL_DIR, you just click “configure” and “generate”. If everything is done, close cmake-gui and go back to terminal to run “make”. Now it’s time for running our executable file


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: