Cmake cannot find Boost folder

I am using Windows 7 - 64bit and trying to create a project. When I use cmake, I get an error

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoos t.cmake:1191 (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 headers. Call Stack (most recent call first): src/CMakeLists.txt:310 (find_package) CMake Error at src/CMakeLists.txt:312 (message): Boost C++ libraries not found. Please install or try setting BOOST_ROOT 

I set the BOOST_ROOT variable to D: \ MyProject \ boost_1_43_0 \ boost \ but I still get this. How can I solve this problem.

+4
source share
1 answer

Placing boost in the project subfolder is not standard CMake's practice for finding boost. I have x64 acceleration - MSVC 2010 installed in Program Files and CMake automatically finds it.

 Boost_DIR : C:/Program Files/Boost/share/cmake/boost Boost_INCLUDE_DIR : C:/Program Files/Boost/include 

You can also try setting Boost_DIR at the level of the system environment variables.

+1
source

Source: https://habr.com/ru/post/1439706/


All Articles