cmake_minimum_required(VERSION 2.8)
project(main)
#配置编译选项 -p可调式
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -g)
#配置头文件搜索路径
#include_directories()
#配置库文件搜索路径
#ink_directories()
#设置需要编译的源文件列表
set(SRC_LIST main.cpp)
#设置可执行文件存储的路径
add_executable(server ${SRC_LIST})
#目标程序需要链接的库文件
target_link_libraries(server muduo_net muduo_base pthread)
#######################################################
#######################################################
一般的开源项目的文件组织
bin #生成的可执行文件
lib #中间库文件
include #头文件
src #源文件
build #编译过程临时文件
example #实例代码
thirdparty #第三方库
CMakeLists.txt
autobuild.sh