feat(Core/Library): Rename shared library to common (#1675)
This commit is contained in:
@@ -15,7 +15,7 @@ CollectSourceFiles(
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/Debugging
|
${CMAKE_CURRENT_SOURCE_DIR}/Debugging
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||||
|
|
||||||
# Manually set sources for Debugging directory as we don't want to include WheatyExceptionReport in shared project
|
# Manually set sources for Debugging directory as we don't want to include WheatyExceptionReport in common project
|
||||||
# It needs to be included both in authserver and worldserver for the static global variable to be properly initialized
|
# It needs to be included both in authserver and worldserver for the static global variable to be properly initialized
|
||||||
# and to handle crash logs on windows
|
# and to handle crash logs on windows
|
||||||
list(APPEND PRIVATE_SOURCES
|
list(APPEND PRIVATE_SOURCES
|
||||||
@@ -23,13 +23,13 @@ list(APPEND PRIVATE_SOURCES
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.h)
|
${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.h)
|
||||||
|
|
||||||
if (USE_COREPCH)
|
if (USE_COREPCH)
|
||||||
set(PRIVATE_PCH_HEADER PrecompiledHeaders/sharedPCH.h)
|
set(PRIVATE_PCH_HEADER PrecompiledHeaders/commonPCH.h)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Group sources
|
# Group sources
|
||||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
add_library(shared
|
add_library(common
|
||||||
${PRIVATE_SOURCES}
|
${PRIVATE_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ CollectIncludeDirectories(
|
|||||||
# Exclude
|
# Exclude
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
|
||||||
|
|
||||||
target_include_directories(shared
|
target_include_directories(common
|
||||||
PUBLIC
|
PUBLIC
|
||||||
# Provide the binary dir for all child targets
|
# Provide the binary dir for all child targets
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
@@ -47,7 +47,7 @@ target_include_directories(shared
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR})
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
target_link_libraries(shared
|
target_link_libraries(common
|
||||||
PRIVATE
|
PRIVATE
|
||||||
game-interface
|
game-interface
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@@ -61,12 +61,12 @@ target_link_libraries(shared
|
|||||||
threads
|
threads
|
||||||
jemalloc)
|
jemalloc)
|
||||||
|
|
||||||
set_target_properties(shared
|
set_target_properties(common
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
FOLDER
|
FOLDER
|
||||||
"server")
|
"server")
|
||||||
|
|
||||||
# Generate precompiled header
|
# Generate precompiled header
|
||||||
if (USE_COREPCH)
|
if (USE_COREPCH)
|
||||||
add_cxx_pch(shared ${PRIVATE_PCH_HEADER})
|
add_cxx_pch(common ${PRIVATE_PCH_HEADER})
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ endif()
|
|||||||
|
|
||||||
target_link_libraries(authserver
|
target_link_libraries(authserver
|
||||||
PUBLIC
|
PUBLIC
|
||||||
shared
|
common
|
||||||
)
|
)
|
||||||
|
|
||||||
CollectIncludeDirectories(
|
CollectIncludeDirectories(
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ target_include_directories(game-interface
|
|||||||
|
|
||||||
target_link_libraries(game-interface
|
target_link_libraries(game-interface
|
||||||
INTERFACE
|
INTERFACE
|
||||||
shared)
|
common)
|
||||||
|
|
||||||
add_library(game STATIC
|
add_library(game STATIC
|
||||||
${PRIVATE_SOURCES}
|
${PRIVATE_SOURCES}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ target_include_directories(scripts-interface
|
|||||||
|
|
||||||
target_link_libraries(scripts-interface
|
target_link_libraries(scripts-interface
|
||||||
INTERFACE
|
INTERFACE
|
||||||
shared)
|
common)
|
||||||
|
|
||||||
add_library(scripts STATIC
|
add_library(scripts STATIC
|
||||||
${scripts_STAT_SRCS}
|
${scripts_STAT_SRCS}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAG
|
|||||||
target_link_libraries(worldserver
|
target_link_libraries(worldserver
|
||||||
PUBLIC
|
PUBLIC
|
||||||
game
|
game
|
||||||
shared
|
common
|
||||||
scripts
|
scripts
|
||||||
gsoap
|
gsoap
|
||||||
readline
|
readline
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ target_include_directories(mapextractor
|
|||||||
|
|
||||||
target_link_libraries(mapextractor
|
target_link_libraries(mapextractor
|
||||||
PUBLIC
|
PUBLIC
|
||||||
shared
|
common
|
||||||
mpq)
|
mpq)
|
||||||
|
|
||||||
CollectIncludeDirectories(
|
CollectIncludeDirectories(
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ add_executable(MeshExtractor ${PRIVATE_SOURCES})
|
|||||||
|
|
||||||
target_link_libraries(MeshExtractor
|
target_link_libraries(MeshExtractor
|
||||||
PUBLIC
|
PUBLIC
|
||||||
shared
|
common
|
||||||
Recast
|
Recast
|
||||||
mpq)
|
mpq)
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ add_executable(mmaps_generator ${PRIVATE_SOURCES})
|
|||||||
|
|
||||||
target_link_libraries(mmaps_generator
|
target_link_libraries(mmaps_generator
|
||||||
PUBLIC
|
PUBLIC
|
||||||
shared
|
common
|
||||||
Recast
|
Recast
|
||||||
mpq)
|
mpq)
|
||||||
|
|
||||||
|
|||||||
@@ -19,26 +19,26 @@ namespace VMAP
|
|||||||
// Need direct access to encapsulated VMAP data, so we add functions for MMAP generator
|
// Need direct access to encapsulated VMAP data, so we add functions for MMAP generator
|
||||||
// maybe add MapBuilder as friend to all of the below classes would be better?
|
// maybe add MapBuilder as friend to all of the below classes would be better?
|
||||||
|
|
||||||
// declared in src/shared/vmap/MapTree.h
|
// declared in src/common/vmap/MapTree.h
|
||||||
void StaticMapTree::getModelInstances(ModelInstance* &models, uint32 &count)
|
void StaticMapTree::getModelInstances(ModelInstance* &models, uint32 &count)
|
||||||
{
|
{
|
||||||
models = iTreeValues;
|
models = iTreeValues;
|
||||||
count = iNTreeValues;
|
count = iNTreeValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
// declared in src/shared/vmap/VMapManager2.h
|
// declared in src/common/vmap/VMapManager2.h
|
||||||
void VMapManager2::getInstanceMapTree(InstanceTreeMap &instanceMapTree)
|
void VMapManager2::getInstanceMapTree(InstanceTreeMap &instanceMapTree)
|
||||||
{
|
{
|
||||||
instanceMapTree = iInstanceMapTrees;
|
instanceMapTree = iInstanceMapTrees;
|
||||||
}
|
}
|
||||||
|
|
||||||
// declared in src/shared/vmap/WorldModel.h
|
// declared in src/common/vmap/WorldModel.h
|
||||||
void WorldModel::getGroupModels(std::vector<GroupModel> &groupModels)
|
void WorldModel::getGroupModels(std::vector<GroupModel> &groupModels)
|
||||||
{
|
{
|
||||||
groupModels = this->groupModels;
|
groupModels = this->groupModels;
|
||||||
}
|
}
|
||||||
|
|
||||||
// declared in src/shared/vmap/WorldModel.h
|
// declared in src/common/vmap/WorldModel.h
|
||||||
void GroupModel::getMeshData(std::vector<G3D::Vector3> &vertices, std::vector<MeshTriangle> &triangles, WmoLiquid* &liquid)
|
void GroupModel::getMeshData(std::vector<G3D::Vector3> &vertices, std::vector<MeshTriangle> &triangles, WmoLiquid* &liquid)
|
||||||
{
|
{
|
||||||
vertices = this->vertices;
|
vertices = this->vertices;
|
||||||
@@ -46,13 +46,13 @@ namespace VMAP
|
|||||||
liquid = iLiquid;
|
liquid = iLiquid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// declared in src/shared/vmap/ModelInstance.h
|
// declared in src/common/vmap/ModelInstance.h
|
||||||
WorldModel* ModelInstance::getWorldModel()
|
WorldModel* ModelInstance::getWorldModel()
|
||||||
{
|
{
|
||||||
return iModel;
|
return iModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// declared in src/shared/vmap/WorldModel.h
|
// declared in src/common/vmap/WorldModel.h
|
||||||
void WmoLiquid::getPosInfo(uint32 &tilesX, uint32 &tilesY, G3D::Vector3 &corner) const
|
void WmoLiquid::getPosInfo(uint32 &tilesX, uint32 &tilesY, G3D::Vector3 &corner) const
|
||||||
{
|
{
|
||||||
tilesX = iTilesX;
|
tilesX = iTilesX;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(vmap4assembler
|
target_link_libraries(vmap4assembler
|
||||||
shared
|
common
|
||||||
zlib)
|
zlib)
|
||||||
|
|
||||||
# Group sources
|
# Group sources
|
||||||
|
|||||||
Reference in New Issue
Block a user