代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.7)
project (Weasel CXX C)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") #设置c++的编译选项
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") #设置c的编译选项
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
# 添加头文件引用目录
include_directories(src)
add_executable(Weasel
src/main.cpp
src/net/server.cpp src/net/server.h
src/http/request.h src/http/request.cpp
src/http/connection.h src/http/connection.cpp
src/http/manage.h src/http/manage.cpp
src/http/handle.h src/http/handle.cpp
src/http/defin.h
src/tools/config.h src/tools/config.cpp
src/tools/tools.h src/tools/tools.cpp
src/lua/test/Student.h src/lua/test/Student.cpp
src/lua/mysql/mysql.h src/lua/mysql/mysql.cpp
src/lua/mysql/connpool.hpp
src/http/response.h src/http/response.cpp
)
# 引用lua相关头文件
include_directories(3rdparty/lua53/src)
# 添加lua库
add_subdirectory(3rdparty/lua53)
target_link_libraries(Weasel lua)
# 添加mysql库
target_link_libraries(Weasel "/usr/lib64/mysql/libmysqlclient.so")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。