1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-23 21:27:45 +00:00
sapphire/CMakeLists.txt

64 lines
2.4 KiB
Text
Raw Normal View History

2018-09-20 23:31:38 +02:00
cmake_policy( SET CMP0014 NEW )
cmake_minimum_required( VERSION 3.0.2 )
project( Sapphire )
2017-08-08 13:53:47 +02:00
2018-12-31 17:30:45 +01:00
set( CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake )
2019-01-03 10:01:00 +01:00
#####################################
# Copy needed files to build-folder #
#####################################
2019-01-02 15:09:59 +01:00
add_custom_target( copy_runtime_files ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/config ${CMAKE_BINARY_DIR}/bin/config
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/sql ${CMAKE_BINARY_DIR}/bin/sql
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/web ${CMAKE_BINARY_DIR}/bin/web
2020-01-26 21:24:38 +11:00
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/sql_import.sh ${CMAKE_BINARY_DIR}/bin/sql_import.sh
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/data/actions
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/deps/ffxiv-actions/actions ${CMAKE_BINARY_DIR}/bin/data/actions )
2019-01-02 15:09:59 +01:00
2018-12-31 17:30:45 +01:00
######################################
# Dependencies and compiler settings #
######################################
2019-01-03 09:53:37 +01:00
include( "cmake/paths.cmake" )
include( "cmake/compiler.cmake" )
include( "cmake/cotire.cmake" )
2018-12-31 17:30:45 +01:00
##############################
# Git #
##############################
2018-03-06 23:20:07 +01:00
include( GetGitRevisionDescription )
get_git_head_revision( GIT_REFSPEC GIT_SHA1 )
git_describe( VERSION --all --dirty=-d )
configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/src/common/Version.cpp.in"
"${CMAKE_CURRENT_SOURCE_DIR}/src/common/Version.cpp" @ONLY )
2018-10-26 15:19:50 +02:00
##############################
2019-01-02 10:28:41 +01:00
# Mysql #
2018-10-26 15:19:50 +02:00
##############################
find_package( MySQL )
2019-01-02 10:28:41 +01:00
##############################
# Dependencies #
##############################
add_subdirectory( "deps/zlib" )
add_subdirectory( "deps/MySQL" )
add_subdirectory( "deps/datReader" )
add_subdirectory( "deps/mysqlConnector" )
add_subdirectory( "deps/recastnavigation" )
2019-01-02 10:28:41 +01:00
##############################
# Main Sapphire Components #
##############################
2019-01-02 11:23:39 +01:00
add_subdirectory( "src/common" )
2018-12-13 12:40:42 +01:00
add_subdirectory( "src/api" )
add_subdirectory( "src/lobby" )
add_subdirectory( "src/world" )
add_subdirectory( "src/scripts" )
2019-01-02 11:23:39 +01:00
add_subdirectory( "src/dbm" )
2018-03-06 22:22:19 +01:00
2019-01-02 10:28:41 +01:00
##############################
# Tools #
##############################
2019-01-02 23:40:34 +01:00
add_subdirectory( "src/tools" )