Skip to content

Commit

Permalink
libevent 启动
Browse files Browse the repository at this point in the history
  • Loading branch information
youngyangyang04 committed Jan 15, 2025
1 parent 53df2e7 commit e84e60d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions fiber_lib/libevent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBEVENT REQUIRED libevent)

# 包含 libevent 和 libco 的头文件路径
# 包含 libevent 头文件路径
include_directories(${LIBEVENT_INCLUDE_DIRS})
include_directories(/home/lhs/apache_corlib/libco/include) # 替换为 libco 的头文件路径

# 添加可执行文件
add_executable(echo_server ../main.cpp)

# 链接 libevent, libco, pthread 和 dl 库
target_link_libraries(echo_server
${LIBEVENT_LIBRARIES}
/home/lhs/apache_corlib/libco/lib/libcolib.a # 替换为 libco 静态库路径
pthread
dl
)
# 链接 libevent 库
target_link_libraries(echo_server ${LIBEVENT_LIBRARIES})

0 comments on commit e84e60d

Please sign in to comment.