diff --git a/CMakeLists.txt b/CMakeLists.txt index b976d5008..4fc7fc6bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ if(MSVC AND NOT Boost_USE_STATIC_LIBS) add_definitions(-DBOOST_ALL_DYN_LINK) endif() -find_package(Boost 1.43 COMPONENTS serialization system filesystem thread date_time regex timer chrono) +find_package(Boost 1.43 COMPONENTS serialization system filesystem thread program_options date_time regex timer chrono) # Required components if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILESYSTEM_LIBRARY OR diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 7116ae060..1c38616a4 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -18,7 +18,7 @@ foreach(example_src ${example_srcs} ) set_target_properties(${example_bin} PROPERTIES EXCLUDE_FROM_ALL ON) endif() - target_link_libraries(${example_bin} ${gtsam-default}) + target_link_libraries(${example_bin} ${gtsam-default} ${Boost_PROGRAM_OPTIONS_LIBRARY}) if(NOT MSVC) add_custom_target(${example_bin}.run ${EXECUTABLE_OUTPUT_PATH}${example_bin} ${ARGN}) endif()