CMake: 常用的CmakeLists.txt

版权声明:本文为博主原创文章,未经博主允许不得转载 https://blog.csdn.net/qit1314/article/details/86308089
project(test)
cmake_minimum_required(VERSION 2.8)

# Boost库
FIND_PACKAGE ( Boost COMPONENTS   thread)

include_directories(
                include
                ${Boost_INCLUDE_DIRS}
                )
message(STATUS "   ${Boost_INCLUDE_DIRS}" )
message(STATUS "   ${Boost_LIBRARIES}" )
add_executable(${PROJECT_NAME} ../main.cpp)
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES}
    )

猜你喜欢

转载自blog.csdn.net/qit1314/article/details/86308089