set(boostLibs chrono filesystem locale program_options regex system thread) if(MSVC) # use boost static libs to avoid LNK2019 errors set(Boost_USE_STATIC_LIBS ON) else() # expose the Boost_USE_STATIC_LIBS option option(Boost_USE_STATIC_LIBS "Use Boost static libraries" OFF) endif(MSVC) find_package(Boost 1.55.0 COMPONENTS ${boostLibs}) if(Boost_FOUND) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) add_definitions(-DHAVE_BOOST=1) endif(Boost_FOUND)