mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
feat(Core/Shared): added new library - shared (#2416)
This commit is contained in:
@@ -16,6 +16,7 @@ set(winDebugging
|
||||
${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.h)
|
||||
endif()
|
||||
|
||||
add_subdirectory(shared)
|
||||
add_subdirectory(game)
|
||||
add_subdirectory(authserver)
|
||||
add_subdirectory(scripts)
|
||||
|
||||
@@ -31,18 +31,6 @@ endif()
|
||||
# Group sources
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(authserver-interface INTERFACE)
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES
|
||||
# Exclude
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||
|
||||
target_include_directories(authserver-interface
|
||||
INTERFACE
|
||||
${PUBLIC_INCLUDES})
|
||||
|
||||
add_executable(authserver
|
||||
${PRIVATE_SOURCES})
|
||||
|
||||
@@ -54,18 +42,24 @@ if(NOT WIN32)
|
||||
endif()
|
||||
|
||||
target_link_libraries(authserver
|
||||
PRIVATE
|
||||
authserver-interface
|
||||
PUBLIC
|
||||
common)
|
||||
shared)
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES
|
||||
# Exclude
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||
|
||||
target_include_directories(authserver
|
||||
PUBLIC
|
||||
${PUBLIC_INCLUDES}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_target_properties(authserver
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
FOLDER
|
||||
"server")
|
||||
|
||||
if( WIN32 )
|
||||
|
||||
32
src/server/shared/CMakeLists.txt
Normal file
32
src/server/shared/CMakeLists.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>
|
||||
#
|
||||
|
||||
CollectSourceFiles(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PRIVATE_SOURCES)
|
||||
|
||||
# Group sources
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(shared
|
||||
${PRIVATE_SOURCES})
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES)
|
||||
|
||||
target_include_directories(shared
|
||||
PUBLIC
|
||||
${PUBLIC_INCLUDES}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
target_link_libraries(shared
|
||||
PUBLIC
|
||||
common)
|
||||
|
||||
set_target_properties(shared
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
"server")
|
||||
@@ -6,9 +6,9 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "RealmList.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
#include "DatabaseEnv.h"
|
||||
|
||||
RealmList::RealmList() : m_UpdateInterval(0), m_NextUpdateTime(time(NULL)) { }
|
||||
RealmList::RealmList() : m_UpdateInterval(0), m_NextUpdateTime(time(nullptr)) { }
|
||||
|
||||
// Load the realm list from the database
|
||||
void RealmList::Initialize(uint32 updateInterval)
|
||||
@@ -70,4 +70,5 @@ private:
|
||||
};
|
||||
|
||||
#define sRealmList ACE_Singleton<RealmList, ACE_Null_Mutex>::instance()
|
||||
|
||||
#endif
|
||||
@@ -29,18 +29,6 @@ endif()
|
||||
# Group sources
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_library(worldserver-interface INTERFACE)
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES
|
||||
# Exclude
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||
|
||||
target_include_directories(worldserver-interface
|
||||
INTERFACE
|
||||
${PUBLIC_INCLUDES})
|
||||
|
||||
add_executable(worldserver
|
||||
${PRIVATE_SOURCES})
|
||||
|
||||
@@ -57,19 +45,25 @@ endif()
|
||||
|
||||
set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}")
|
||||
|
||||
CollectIncludeDirectories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC_INCLUDES
|
||||
# Exclude
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||
|
||||
target_include_directories(worldserver
|
||||
PUBLIC
|
||||
${PUBLIC_INCLUDES}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
target_link_libraries(worldserver
|
||||
PRIVATE
|
||||
worldserver-interface
|
||||
authserver-interface
|
||||
game-interface
|
||||
scripts-interface
|
||||
PUBLIC
|
||||
game
|
||||
common
|
||||
shared
|
||||
scripts
|
||||
gsoap
|
||||
readline
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "TCSoap.h"
|
||||
#include "Timer.h"
|
||||
#include "Util.h"
|
||||
#include "AuthSocket.h"
|
||||
#include "RealmList.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user