mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(Cmake): set minimal support version 3.8 and added interface libs for world and auth (#2295)
* Added interface library authserver-interface * Added interfaca library worldserver-interface * Added Copyright's in auth and world server Cmake's files
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
#
|
||||||
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||||
#
|
#
|
||||||
# This file is free software; as a special exception the author gives
|
# This file is free software; as a special exception the author gives
|
||||||
@@ -7,12 +8,15 @@
|
|||||||
# This program is distributed in the hope that it will be useful, but
|
# This program is distributed in the hope that it will be useful, but
|
||||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
#
|
||||||
|
|
||||||
# Set projectname (must be done AFTER setting configurationtypes)
|
# Set projectname (must be done AFTER setting configurationtypes)
|
||||||
project(AzerothCore)
|
project(AzerothCore)
|
||||||
|
|
||||||
|
# Require a min version Cmake
|
||||||
|
cmake_minimum_required(VERSION 3.8)
|
||||||
|
|
||||||
# CMake policies (can not be handled elsewhere)
|
# CMake policies (can not be handled elsewhere)
|
||||||
cmake_minimum_required(VERSION 2.8)
|
|
||||||
cmake_policy(SET CMP0005 OLD)
|
cmake_policy(SET CMP0005 OLD)
|
||||||
|
|
||||||
# add this options before PROJECT keyword
|
# add this options before PROJECT keyword
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (C)
|
#
|
||||||
|
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||||
#
|
#
|
||||||
# This file is free software; as a special exception the author gives
|
# This file is free software; as a special exception the author gives
|
||||||
# unlimited permission to copy and/or distribute it, with or without
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
@@ -30,22 +31,7 @@ endif()
|
|||||||
# Group sources
|
# Group sources
|
||||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
add_executable(authserver
|
add_library(authserver-interface INTERFACE)
|
||||||
${PRIVATE_SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
add_dependencies(authserver revision.h)
|
|
||||||
|
|
||||||
if( NOT WIN32 )
|
|
||||||
set_target_properties(authserver PROPERTIES
|
|
||||||
COMPILE_DEFINITIONS _TRINITY_REALM_CONFIG="${CONF_DIR}/authserver.conf"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(authserver
|
|
||||||
PUBLIC
|
|
||||||
common
|
|
||||||
)
|
|
||||||
|
|
||||||
CollectIncludeDirectories(
|
CollectIncludeDirectories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@@ -53,9 +39,27 @@ CollectIncludeDirectories(
|
|||||||
# Exclude
|
# Exclude
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||||
|
|
||||||
target_include_directories(authserver
|
target_include_directories(authserver-interface
|
||||||
|
INTERFACE
|
||||||
|
${PUBLIC_INCLUDES})
|
||||||
|
|
||||||
|
add_executable(authserver
|
||||||
|
${PRIVATE_SOURCES})
|
||||||
|
|
||||||
|
add_dependencies(authserver revision.h)
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
|
set_target_properties(authserver PROPERTIES
|
||||||
|
COMPILE_DEFINITIONS _TRINITY_REALM_CONFIG="${CONF_DIR}/authserver.conf")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(authserver
|
||||||
|
PRIVATE
|
||||||
|
authserver-interface
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${PUBLIC_INCLUDES}
|
common)
|
||||||
|
|
||||||
|
target_include_directories(authserver
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR})
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Copyright (C)
|
#
|
||||||
|
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
|
||||||
#
|
#
|
||||||
# This file is free software; as a special exception the author gives
|
# This file is free software; as a special exception the author gives
|
||||||
# unlimited permission to copy and/or distribute it, with or without
|
# unlimited permission to copy and/or distribute it, with or without
|
||||||
@@ -28,8 +29,7 @@ endif()
|
|||||||
# Group sources
|
# Group sources
|
||||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
add_executable(worldserver
|
add_library(worldserver-interface INTERFACE)
|
||||||
${PRIVATE_SOURCES})
|
|
||||||
|
|
||||||
CollectIncludeDirectories(
|
CollectIncludeDirectories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@@ -37,100 +37,36 @@ CollectIncludeDirectories(
|
|||||||
# Exclude
|
# Exclude
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||||
|
|
||||||
target_include_directories(worldserver
|
target_include_directories(worldserver-interface
|
||||||
PUBLIC
|
INTERFACE
|
||||||
${PUBLIC_INCLUDES}
|
${PUBLIC_INCLUDES})
|
||||||
PRIVATE
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Accounts
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Achievements
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/AI
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/AI/CoreAI
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/AI/ScriptedAI
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/AI/SmartScripts
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/AuctionHouse/AuctionHouseBot
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Battlefield
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Battlefield/Zones
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Battlegrounds
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Battlegrounds/Zones
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Calendar
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Chat
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Chat/Channels
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Combat
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Conditions
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/DataStores
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/DungeonFinding
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Creature
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Corpse
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/DynamicObject
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/GameObject
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Item/Container
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Object/Updates
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Pet
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Player
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Totem
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Unit
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Vehicle
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Entities/Transport
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Events
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Globals
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Grids/Cells
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Grids/Notifiers
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Grids
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Groups
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Guilds
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Handlers
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Instances
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Loot
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Mails
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Maps
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Miscellaneous
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Motd
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Movement
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Movement/Spline
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Movement/MovementGenerators
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Movement/Waypoints
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/OutdoorPvP
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Pools
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Quests
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Reputation
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Scripting
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Server/Protocol
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Server
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Skills
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Spells
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Spells/Auras
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Tools
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Warden
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Warden/Modules
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Weather
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/World
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/game/Misc
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/authserver/Server
|
|
||||||
${CMAKE_SOURCE_DIR}/src/server/authserver/Realms)
|
|
||||||
|
|
||||||
if( NOT WIN32 )
|
add_executable(worldserver
|
||||||
|
${PRIVATE_SOURCES})
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
set_target_properties(worldserver PROPERTIES
|
set_target_properties(worldserver PROPERTIES
|
||||||
COMPILE_DEFINITIONS _TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf"
|
COMPILE_DEFINITIONS _TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf")
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_dependencies(worldserver revision.h)
|
add_dependencies(worldserver revision.h)
|
||||||
|
|
||||||
if( UNIX AND NOT NOJEM )
|
if(UNIX AND NOT NOJEM)
|
||||||
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
|
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}")
|
set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}")
|
||||||
|
|
||||||
|
target_include_directories(worldserver
|
||||||
|
PRIVATE
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
target_link_libraries(worldserver
|
target_link_libraries(worldserver
|
||||||
|
PRIVATE
|
||||||
|
worldserver-interface
|
||||||
|
authserver-interface
|
||||||
|
game-interface
|
||||||
|
scripts-interface
|
||||||
PUBLIC
|
PUBLIC
|
||||||
game
|
game
|
||||||
common
|
common
|
||||||
|
|||||||
Reference in New Issue
Block a user