1 Star 0 Fork 0

caochufeng/muduo-lua

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
Shuo Chen 提交于 2018-01-05 01:58 . also works with luajit.
cmake_minimum_required(VERSION 2.6)
project(muduo-lua CXX)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "debug")
endif()
if(NOT MUDUO_PATH)
set(MUDUO_PATH "$ENV{HOME}/build/${CMAKE_BUILD_TYPE}-install")
endif()
set(CXX_FLAGS
-g
# -DVALGRIND
# -DMUDUO_STD_STRING
-DLUA_COMPAT_ALL
-DLUA_USE_LINUX
-Wall
-Wextra
# -m32
-Werror
-Wconversion
-Wno-unused-parameter
-Wold-style-cast
-Woverloaded-virtual
-Wpointer-arith
-Wshadow
-Wwrite-strings
-march=native
# -MMD
# -std=c++0x
-rdynamic
)
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
# set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS_DEBUG "-O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
find_path(Muduo_INCLUDE_DIR muduo "${MUDUO_PATH}/include")
find_path(Muduo_LIBRARY_DIR libmuduo_net.a "${MUDUO_PATH}/lib")
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${Muduo_LIBRARY_DIR})
message(STATUS ${Muduo_INCLUDE_DIR})
message(STATUS ${Muduo_LIBRARY_DIR})
include_directories(${Muduo_INCLUDE_DIR})
find_library(muduo_base muduo_base)
find_library(muduo_net muduo_net)
find_library(muduo_http muduo_http)
find_library(muduo_inspect muduo_inspect)
message(STATUS ${muduo_base})
message(STATUS ${muduo_net})
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
if (LUA_INCLUDE_DIR AND LUA_LIBRARY)
message(STATUS "Use Lua in ${LUA_INCLUDE_DIR}")
set(LUA_LIBRARIES "${LUA_LIBRARY}")
message(STATUS "Lua libraries: ${LUA_LIBRARIES}")
else()
# TODO: if not found, build our own ?
find_package(Lua REQUIRED)
message(STATUS "Found Lua ${LUA_VERSION_STRING} in ${LUA_INCLUDE_DIR}")
message(STATUS "Lua libraries: ${LUA_LIBRARIES}")
endif()
include_directories(${LUA_INCLUDE_DIR})
include_directories(${PROJECT_SOURCE_DIR})
add_subdirectory(hello)
add_subdirectory(world)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Lua
1
https://gitee.com/caochufeng/muduo-lua.git
[email protected]:caochufeng/muduo-lua.git
caochufeng
muduo-lua
muduo-lua
master

搜索帮助