forked from metin2/server
44 lines
1.0 KiB
CMake
44 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.12)
|
|
|
|
# Build mode debug/release?
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
# Set C++ standard to C++11
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
project("Metin2 Server")
|
|
|
|
set(BINARY_OUTPUT_DIR ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
# Set build directory
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
# Set the CMake module directory
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/Modules/")
|
|
|
|
# Set environment variables
|
|
set(METIN2_OS_NAME ${CMAKE_SYSTEM})
|
|
set(METIN2_COMPILER_NAME ${CMAKE_CXX_COMPILER_ID})
|
|
set(METIN2_CPU_TARGET ${CMAKE_SYSTEM_PROCESSOR})
|
|
|
|
# Git revision
|
|
include(FindGit)
|
|
find_package(Git)
|
|
|
|
set(METIN2_REVISION "unknown")
|
|
|
|
message(STATUS "Current revision is ${METIN2_REVISION}")
|
|
|
|
# Set the global include directories
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
add_subdirectory(libgame)
|
|
add_subdirectory(liblua)
|
|
add_subdirectory(libpoly)
|
|
add_subdirectory(libsql)
|
|
add_subdirectory(libthecore)
|
|
add_subdirectory(game)
|
|
add_subdirectory(db)
|
|
add_subdirectory(quest)
|