Let’s say you have a package installed in the standard location (I will use the Point Cloud Library -PCL- version 1.8 as example).  After the find_package command the variable PCL_DIR will be set to “/usr/local/share/pcl-1.8”.

But if you have another installation of PCL in “/home/myname/pcl-1.8.0” for example, you can force find_package to load your alternative installation with

find_package(PCL 1.8.0 
 PATHS /home/myname/pcl-1.8.0/share/pcl-1.8

This way, the variable PCL_DIR will be set to “/home/myname/pcl-1.8.0/share/pcl-1.8”.