Boost header files are on /usr/include/boost
.
In CMakeLists.txt
I include the folder with include_directories
include_directories(/usr/include /usr/include/boost/
/usr/include/boost/smart_ptr)
However, cmake
insists in not finding header files. The problem arises in intrusive_ptr.hpp
, which includes #include <boost/smart_ptr/intrusive_ptr.hpp
:
boost/smart_ptr/intrusive_ptr.hpp: No such file or directory
/usr/include/boost/intrusive_ptr.hpp
My guess is it does not like boost/smart_ptr/
prefix.
So, include_directories
did not work.
CMake Error:
CMake Error at /usr/local/share/cmake-3.3/Modules/FindBoost.cmake:1245
(message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
What should I do?
Thanks.