CMake: Couldn't find Boost

I am trying to install gtsam and am facing some problems.

I installed boost for c:/program files/boost/boost_1_56_0

and added to my CMakeLists.text:

set(BOOST_ROOT "c:/Program Files/boost/boost_1_56_0")

set(BOOST_LIBRARYDIR "C:\Program Files\boost\boost_1_56_0\stage\lib")


However, when I try to configure CMake, I get the following error:

-- GTSAM_SOURCE_ROOT_DIR: [C:/Program Files/gtsam-3.1.0]

-- Could NOT find Boost

-- CMake Error at CMakeLists.txt:106 (message):
   Missing required Boost components >= v1.43, please install/upgrade Boost or
   configure your search paths.


I am completely new to this and I am on my way. Any suggestions?


source to share

1 answer

First you need to add the boost directory:



then you need to use boost header files for your executable:

add_executable(myexec execfile.cpp ${HEADER_FILES})




All Articles