# boost
if(MSVC)
# vs会自动链接
else()
link_directories("/usr/locate/boost") # BOOST 安装位置
find_package(Boost COMPONENTS json system filesystem program_options locale json REQUIRED)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
MESSAGE( STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}.")
MESSAGE( STATUS "Boost_LIBRARIES = ${Boost_LIBRARIES}.")
MESSAGE( STATUS "Boost_LIB_VERSION = ${Boost_LIB_VERSION}.")
target_link_libraries (${PROJECT_NAME} PRIVATE ${Boost_LIBRARIES})
endif()
endif()
本博客所有文章除特别声明外,均采用CC BY-NC-SA 4.0 许可协议。转载请注明来自 张拓的博客!