当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
xiaozhuai 提交于 2017-05-04 12:50 . remove libeio from project
cmake_minimum_required(VERSION 2.6)
project(efserv)
set(CMAKE_CXX_STANDARD 11)
set(EXECUTABLE_NAME efserv)
if ("${CMAKE_BUILD_TYPE}" STREQUAL Debug)
message(STATUS "Build env: Debug")
ADD_DEFINITIONS(-DDEBUG)
else()
message(STATUS "Build env: Release")
remove_definitions(-DDEBUG)
endif()
include(cmake_find_libev.cmake)
include(cmake_find_libeio.cmake)
add_subdirectory(thirdparty/libhttp_parser)
add_subdirectory(thirdparty/tinyformat)
include_directories(
${LIBEV_INCLUDE_DIR}
${LIBEIO_INCLUDE_DIR}
${LIBHTTP_PARSER_INCLUDE_DIR}
${LIBTINYFORMAT_INCLUDE_DIR}
)
file(GLOB_RECURSE SOURCE_FILES "src/*.cpp")
add_executable(${EXECUTABLE_NAME} ${SOURCE_FILES})
target_link_libraries(
${EXECUTABLE_NAME}
${LIBEV_LIBRARY}
${LIBEIO_LIBRARY}
${LIBHTTP_PARSER_LIBRARY}
)
# add install target
SET(CMAKE_INSTALL_PREFIX /usr/local)
INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/${EXECUTABLE_NAME} DESTINATION bin)
INSTALL(DIRECTORY tpl DESTINATION efserv)
INSTALL(DIRECTORY built-in DESTINATION efserv)
INSTALL(FILES README.md README_CN.md LICENSE .efserv_access config.ini DESTINATION efserv)
# uninstall target
include(cmake_uninstall.cmake)
add_uninstall_target()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化