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
+7 -7
View File
@@ -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 ()
+1 -1
View File
@@ -44,7 +44,7 @@ endif()
target_link_libraries(authserver target_link_libraries(authserver
PUBLIC PUBLIC
shared common
) )
CollectIncludeDirectories( CollectIncludeDirectories(
+1 -1
View File
@@ -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}
+1 -1
View File
@@ -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}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -24,7 +24,7 @@ target_include_directories(mapextractor
target_link_libraries(mapextractor target_link_libraries(mapextractor
PUBLIC PUBLIC
shared common
mpq) mpq)
CollectIncludeDirectories( CollectIncludeDirectories(
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+6 -6
View File
@@ -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;
+1 -1
View File
@@ -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