diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in index f3089dfec1b..f4ef6a0ffd2 100644 --- a/PCLConfig.cmake.in +++ b/PCLConfig.cmake.in @@ -717,7 +717,7 @@ if(WIN32 AND NOT MINGW) get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) else(WIN32 AND NOT MINGW) # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y - set(PCL_ROOT "@CMAKE_INSTALL_PREFIX@") + get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) endif(WIN32 AND NOT MINGW) # check whether PCLConfig.cmake is found into a PCL installation or in a build tree