[CMake] CMake does not find an header file, and ignores the classes found in several other header files.

Rolf Eike Beer eike at sf-mail.de
Mon Aug 6 03:21:55 EDT 2012


> ADD_DEFINITIONS(${PCL_DEFINITIONS} ${QT_DEFINITIONS})
>
> LINK_DIRECTORIES(${PCL_DEFINITIONS})

This combination is most likely wrong. Adding the same things as 
compiler definitions as well as linker path entries would only be 
correct when the variable is empty.

Also: don't use link_directories(). It's basically always causing 
trouble. Very likely exactly the error you see. If the PCL module does 
not return absolute paths to the libraries you need to link it is broken 
and needs to be fixed.

Eike


More information about the CMake mailing list