Murphy316
Murphy316

Reputation: 766

Cmake can't find Boost Folder

I am using windows 7 - 64bit and am trying to build a project. When I use cmake i get the 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's 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 have set the variable to BOOST_ROOT to D:\MyProject\boost_1_43_0\boost\ but i still get this . How can i resolve this issue.

Upvotes: 4

Views: 10142

Answers (1)

whatnick
whatnick

Reputation: 5470

Placing boost in a subfolder of the project is not standard CMake practice for locating boost. I have boost x64 - MSVC 2010 installed in Program Files and CMake automatically locates it.

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

You can attempt to set Boost_DIR at the system environment variables level as well.

Upvotes: 1

Related Questions