代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0048 NEW)
project(zjtcp VERSION 0.1.0.0)
option(DEBUG "enable debug" ON)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O0 -g -Wno-unused-but-set-variable -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-unused-function -Wno-unused-variable")
# include aux cmake scripts
include("Gengetopt.cmake")
ADD_GENGETOPT_FILES(CMDLINE cmdline.ggo)
include("Findlibev.cmake")
set (EXTRALIB ${LIBEV_LIBRARY})
# configure a header file to pass some of the CMake settings
# to the source code
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
include_directories("${CMAKE_CURRENT_BINARY_DIR}"
"${PROJECT_BINARY_DIR}"
"${PROJECT_SOURCE_DIR}")
set(RCTLD
serial.c
common.c
cmdline.c
buffer.c
main.c
)
# extra libs
find_package(Threads)
set (EXTRALIB ${EXTRALIB} ${CMAKE_THREAD_LIBS_INIT})
# target
add_executable(zjtcp ${CMDLINE} ${RCTLD} ${LIBLIST} )
target_link_libraries(zjtcp ${EXTRALIB} m)
# install
install(TARGETS zjtcp DESTINATION bin)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。