feat(Core/Library): Rename shared library to common (#1675)

This commit is contained in:
Kargatum
2019-04-04 16:47:17 +07:00
committed by GitHub
parent 7ad58aa6ea
commit 5105333968
11 changed files with 23 additions and 23 deletions

View File

@@ -15,7 +15,7 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}/Debugging
${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
# and to handle crash logs on windows
list(APPEND PRIVATE_SOURCES
@@ -23,13 +23,13 @@ list(APPEND PRIVATE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.h)
if (USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/sharedPCH.h)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/commonPCH.h)
endif()
# Group sources
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(shared
add_library(common
${PRIVATE_SOURCES}
)
@@ -39,7 +39,7 @@ CollectIncludeDirectories(
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(shared
target_include_directories(common
PUBLIC
# Provide the binary dir for all child targets
${CMAKE_BINARY_DIR}
@@ -47,7 +47,7 @@ target_include_directories(shared
PRIVATE
${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(shared
target_link_libraries(common
PRIVATE
game-interface
PUBLIC
@@ -61,12 +61,12 @@ target_link_libraries(shared
threads
jemalloc)
set_target_properties(shared
set_target_properties(common
PROPERTIES
FOLDER
"server")
# Generate precompiled header
if (USE_COREPCH)
add_cxx_pch(shared ${PRIVATE_PCH_HEADER})
add_cxx_pch(common ${PRIVATE_PCH_HEADER})
endif ()

View File

@@ -44,7 +44,7 @@ endif()
target_link_libraries(authserver
PUBLIC
shared
common
)
CollectIncludeDirectories(

View File

@@ -37,7 +37,7 @@ target_include_directories(game-interface
target_link_libraries(game-interface
INTERFACE
shared)
common)
add_library(game STATIC
${PRIVATE_SOURCES}

View File

@@ -91,7 +91,7 @@ target_include_directories(scripts-interface
target_link_libraries(scripts-interface
INTERFACE
shared)
common)
add_library(scripts STATIC
${scripts_STAT_SRCS}

View File

@@ -133,7 +133,7 @@ set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAG
target_link_libraries(worldserver
PUBLIC
game
shared
common
scripts
gsoap
readline

View File

@@ -16,7 +16,7 @@ CollectSourceFiles(
add_executable(mapextractor
${PRIVATE_SOURCES}
)
target_include_directories(mapextractor
PUBLIC
${CMAKE_SOURCE_DIR}
@@ -24,7 +24,7 @@ target_include_directories(mapextractor
target_link_libraries(mapextractor
PUBLIC
shared
common
mpq)
CollectIncludeDirectories(

View File

@@ -17,7 +17,7 @@ add_executable(MeshExtractor ${PRIVATE_SOURCES})
target_link_libraries(MeshExtractor
PUBLIC
shared
common
Recast
mpq)

View File

@@ -16,7 +16,7 @@ add_executable(mmaps_generator ${PRIVATE_SOURCES})
target_link_libraries(mmaps_generator
PUBLIC
shared
common
Recast
mpq)

View File

@@ -19,26 +19,26 @@ namespace VMAP
// 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?
// declared in src/shared/vmap/MapTree.h
// declared in src/common/vmap/MapTree.h
void StaticMapTree::getModelInstances(ModelInstance* &models, uint32 &count)
{
models = iTreeValues;
count = iNTreeValues;
}
// declared in src/shared/vmap/VMapManager2.h
// declared in src/common/vmap/VMapManager2.h
void VMapManager2::getInstanceMapTree(InstanceTreeMap &instanceMapTree)
{
instanceMapTree = iInstanceMapTrees;
}
// declared in src/shared/vmap/WorldModel.h
// declared in src/common/vmap/WorldModel.h
void WorldModel::getGroupModels(std::vector<GroupModel> &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)
{
vertices = this->vertices;
@@ -46,13 +46,13 @@ namespace VMAP
liquid = iLiquid;
}
// declared in src/shared/vmap/ModelInstance.h
// declared in src/common/vmap/ModelInstance.h
WorldModel* ModelInstance::getWorldModel()
{
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
{
tilesX = iTilesX;

View File

@@ -16,11 +16,11 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
endif()
target_link_libraries(vmap4assembler
shared
common
zlib)
# Group sources
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(vmap4assembler
PROPERTIES