0

I am trying to install a particular c++ library that has Boost dependencies. I installed Boost no problem and the include path is under /usr/local/include/.

However, when I call cmake, I get the following error:

CMake Error at     
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindBoost.cmake:1245 (message):
Unable to find the requested Boost libraries.
Boost version: 0.0.0
Boost include path: /usr/include
Detected version of Boost is too old.  Requested version was 1.36 (or newer).
Call Stack (most recent call first):
CMakeLists.txt:10 (FIND_PACKAGE)

I know the Boost include path does not match, but I don't know how to have it reference the correct path. The CMakeLists.txt file calls FIND_PACKAGE(Boost 1.36 COMPONENTS program_options REQUIRED): I didn't see any parameters that would allow me to specify the path.

Thanks,

Sean
  • 445
  • 1
  • 5
  • 10

1 Answers1

0

You can set the Boost path with:

SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/.../boost")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "/.../boost/lib")

Making sure to place this before the FIND_PACKAGE call in CMakeLists.txt. (Cmake doesn't find Boost)

Community
  • 1
  • 1
Sean
  • 445
  • 1
  • 5
  • 10