2021-11-16 07:59:13 +00:00
|
|
|
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
|
|
|
|
set(PROJECT_CONTACT romange@gmail.com)
|
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
|
|
|
|
|
|
|
# Set targets in folders
|
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
project(DRAGONFLY C CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
|
|
|
# We must define all the required variables from the root cmakefile, otherwise
|
|
|
|
# they just disappear.
|
2021-11-18 15:14:05 +00:00
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/helio/cmake" ${CMAKE_MODULE_PATH})
|
2021-11-16 07:59:13 +00:00
|
|
|
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
|
|
|
|
|
|
|
include(third_party)
|
|
|
|
include(internal)
|
|
|
|
|
2022-02-04 07:38:50 +00:00
|
|
|
add_third_party(
|
|
|
|
lua
|
|
|
|
URL https://github.com/lua/lua/archive/refs/tags/v5.4.4.tar.gz
|
|
|
|
PATCH_COMMAND patch -p1 -i "${CMAKE_CURRENT_SOURCE_DIR}/patches/lua-v5.4.4.patch"
|
|
|
|
CONFIGURE_COMMAND echo
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
INSTALL_COMMAND cp <SOURCE_DIR>/liblua.a ${THIRD_PARTY_LIB_DIR}/lua/lib/
|
|
|
|
COMMAND cp <SOURCE_DIR>/lualib.h <SOURCE_DIR>/lua.h <SOURCE_DIR>/lauxlib.h
|
|
|
|
<SOURCE_DIR>/luaconf.h ${THIRD_PARTY_LIB_DIR}/lua/include
|
|
|
|
)
|
|
|
|
|
2021-11-16 07:59:13 +00:00
|
|
|
Message(STATUS "THIRD_PARTY_LIB_DIR ${THIRD_PARTY_LIB_DIR}")
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
2021-11-18 15:14:05 +00:00
|
|
|
include_directories(helio)
|
2021-11-16 07:59:13 +00:00
|
|
|
|
2021-11-18 15:14:05 +00:00
|
|
|
add_subdirectory(helio)
|
2021-12-20 20:46:51 +00:00
|
|
|
add_subdirectory(core)
|
2021-12-27 08:03:29 +00:00
|
|
|
add_subdirectory(redis)
|
2021-11-16 08:39:38 +00:00
|
|
|
add_subdirectory(server)
|