Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ylmbtm committed Jun 17, 2022
1 parent 4d16eb9 commit 8009a8f
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 139 deletions.
25 changes: 12 additions & 13 deletions Server/Src/AccountServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
cmake_minimum_required(VERSION 2.8.9)
project(AccountServer)
SET(PROJECT_ROOT_PATH ".")
add_definitions(-std=c++11)
add_definitions(-w)
include_directories(./ ../ServerEngine ../../Common/Lua ../ServerEngine/DBInterface ../ServerData ../../Common/Mysql ../../Common/protobuf/src ../Message ../LogData ../PublicData ../WatcherClient)
link_directories(../../Common/lib /usr/lib64/mysql)
link_directories(../../Common/lib /usr/lib64/mysql)


#消息
Expand Down Expand Up @@ -41,24 +39,25 @@ source_group(WatcherClient FILES ${WATCHER_CLIENT} )

# Target
add_executable(AccountServer
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
)


if(MSVC)
target_link_libraries(AccountServer ServerEngine protobuf libmysql ws2_32)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(AccountServer ServerEngine protobuf libmysql ws2_32)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else()
target_link_libraries(AccountServer ServerEngine protobuf mysqlclient pthread )
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(AccountServer ServerEngine protobuf mysqlclient pthread )
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
endif()


if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -std=c++11")
endif()

23 changes: 11 additions & 12 deletions Server/Src/CenterServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 2.8.9)
project(CenterServer)
SET(PROJECT_ROOT_PATH ".")
add_definitions(-std=c++11)
add_definitions(-w)
include_directories(./ ../ServerEngine ../ServerEngine/DBInterface ../../Common/protobuf/src ../ServerData ../../Common/Mysql ../Message ../PublicData ../WatcherClient)
link_directories(../../Common/lib /usr/lib64/mysql)

Expand Down Expand Up @@ -41,24 +39,25 @@ source_group(WatcherClient FILES ${WATCHER_CLIENT} )

# Target
add_executable(CenterServer
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
)


if(MSVC)
target_link_libraries(CenterServer ServerEngine protobuf libmysql ws2_32)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(CenterServer ServerEngine protobuf libmysql ws2_32)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else()
target_link_libraries(CenterServer ServerEngine protobuf mysqlclient pthread )
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(CenterServer ServerEngine protobuf mysqlclient pthread )
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
endif()


if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -std=c++11")
endif()

25 changes: 12 additions & 13 deletions Server/Src/DBServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
cmake_minimum_required(VERSION 2.8.9)
project(DBServer)
SET(PROJECT_ROOT_PATH ".")
add_definitions(-std=c++11)
add_definitions(-w)
include_directories(./ ../ServerEngine ../ServerEngine/DBInterface ../../Common/protobuf/src ../ServerData ../../Common/Mysql ../Message ../PublicData ../WatcherClient)
include_directories(./ ../ServerEngine ../ServerEngine/DBInterface ../ServerData ../../Common/Mysql ../../Common/protobuf/src ../Message ../PublicData ../WatcherClient)
link_directories(../../Common/lib /usr/lib64/mysql)


Expand Down Expand Up @@ -41,25 +39,26 @@ source_group(WatcherClient FILES ${WATCHER_CLIENT} )

# Target
add_executable(DBServer
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
)



if(MSVC)
target_link_libraries(DBServer ServerEngine protobuf libmysql ws2_32)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(DBServer ServerEngine protobuf libmysql ws2_32)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else()
target_link_libraries(DBServer ServerEngine protobuf mysqlclient pthread )
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(DBServer ServerEngine protobuf mysqlclient pthread )
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
endif()


if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -std=c++11")
endif()

31 changes: 15 additions & 16 deletions Server/Src/LogServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
cmake_minimum_required(VERSION 2.8.9)
project(LogServer)
SET(PROJECT_ROOT_PATH ".")
add_definitions(-std=c++11)
add_definitions(-w)
include_directories(./ ../ServerEngine ../ServerEngine/DBInterface ../PublicData ../StaticData ../../Common/protobuf/src ../../Common/Sqlite ../ServerData ../../Common/Mysql ../Message ../LogData ../ServerData ../WatcherClient)
link_directories(../../Common/lib /usr/lib64/mysql)


#消息
set(PROTO Proto)
FILE(GLOB PROTO "../Message/Msg_Base.pb.cc"
"../Message/Msg_Base.pb.h"
"../Message/Msg_Game.pb.cc"
"../Message/Msg_Game.pb.h")
"../Message/Msg_Base.pb.h"
"../Message/Msg_Game.pb.cc"
"../Message/Msg_Game.pb.h")

#header file code
set(HEADER_CODE_FILE HeaderFiles)
Expand All @@ -34,25 +32,26 @@ source_group(SourceFiles FILES ${SOURCE_CODE_FILE} )

# Target
add_executable(LogServer
${PROTO}
${STATIC_DATA}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
${PROTO}
${STATIC_DATA}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
)


if(MSVC)
target_link_libraries(LogServer ServerEngine protobuf libmysql ws2_32 sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(LogServer ServerEngine protobuf libmysql ws2_32 sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else()
target_link_libraries(LogServer ServerEngine protobuf mysqlclient pthread sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(LogServer ServerEngine protobuf mysqlclient pthread sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
endif()


if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -std=c++11")
endif()

73 changes: 34 additions & 39 deletions Server/Src/LogicServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
cmake_minimum_required(VERSION 2.8.9)
project(LogicServer)
SET(PROJECT_ROOT_PATH ".")
add_definitions(-std=c++11)
add_definitions(-w)
include_directories(./ ../ServerEngine ../ServerEngine/DBInterface ../PublicData ../StaticData ../../Common/SQLite ../ServerData ../../Common/Mysql ../../Common/protobuf/src ../Message ../LogData ../ServerData ../WatcherClient)
link_directories(../../Common/lib /usr/lib64/mysql)
link_directories(../../Common/lib /usr/lib64/mysql)


#消息
set(PROTO Proto)
FILE(GLOB PROTO "../Message/Game_Define.pb.cc"
"../Message/Game_Define.pb.h"
"../Message/Msg_Account.pb.cc"
"../Message/Msg_Account.pb.h"
"../Message/Msg_Base.pb.cc"
"../Message/Msg_Base.pb.h"
"../Message/Msg_Copy.pb.cc"
"../Message/Msg_Copy.pb.h"
"../Message/Msg_Game.pb.cc"
"../Message/Msg_Game.pb.h"
"../Message/Msg_ID.pb.cc"
"../Message/Msg_ID.pb.h"
"../Message/Msg_LoginCltData.pb.cc"
"../Message/Msg_LoginCltData.pb.h"
"../Message/Msg_LoginDBData.pb.cc"
"../Message/Msg_LoginDBData.pb.h"
"../Message/Msg_Payment.pb.cc"
"../Message/Msg_Payment.pb.h"
"../Message/Msg_RetCode.pb.cc"
"../Message/Msg_RetCode.pb.h"
"../Message/Msg_Role.pb.cc"
"../Message/Msg_Role.pb.h")
"../Message/Game_Define.pb.h"
"../Message/Msg_Account.pb.cc"
"../Message/Msg_Account.pb.h"
"../Message/Msg_Base.pb.cc"
"../Message/Msg_Base.pb.h"
"../Message/Msg_Copy.pb.cc"
"../Message/Msg_Copy.pb.h"
"../Message/Msg_Game.pb.cc"
"../Message/Msg_Game.pb.h"
"../Message/Msg_ID.pb.cc"
"../Message/Msg_ID.pb.h"
"../Message/Msg_LoginCltData.pb.cc"
"../Message/Msg_LoginCltData.pb.h"
"../Message/Msg_LoginDBData.pb.cc"
"../Message/Msg_LoginDBData.pb.h"
"../Message/Msg_Payment.pb.cc"
"../Message/Msg_Payment.pb.h"
"../Message/Msg_RetCode.pb.cc"
"../Message/Msg_RetCode.pb.h"
"../Message/Msg_Role.pb.cc"
"../Message/Msg_Role.pb.h")


#Staic Data
Expand All @@ -50,36 +48,33 @@ FILE(GLOB WATCHER_CLIENT "../WatcherClient/WatcherClient.cpp" "../WatcherClient/
set(SOURCE_CODE_FILE SourceFiles)
FILE(GLOB SOURCE_CODE_FILE "./*.cpp")


source_group(Proto FILES ${PROTO} )
source_group(StaticData FILES ${STATIC_DATA} )
source_group(WatcherClient FILES ${WATCHER_CLIENT} )
source_group(HeaderFiles FILES ${HEADER_CODE_FILE} )
source_group(SourceFiles FILES ${SOURCE_CODE_FILE} )



# Target
add_executable(LogicServer
${PROTO}
${STATIC_DATA}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
${PROTO}
${STATIC_DATA}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
)


if(MSVC)
target_link_libraries(LogicServer ServerEngine protobuf libmysql ws2_32 sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(LogicServer ServerEngine protobuf libmysql ws2_32 sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else()
target_link_libraries(LogicServer ServerEngine protobuf mysqlclient pthread sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(LogicServer ServerEngine protobuf mysqlclient pthread sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
endif()


if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -std=c++11")
endif()

37 changes: 18 additions & 19 deletions Server/Src/LoginServer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
cmake_minimum_required(VERSION 2.8.9)
project(LoginServer)
SET(PROJECT_ROOT_PATH ".")
add_definitions(-std=c++11)
add_definitions(-w)
include_directories(./ ../ServerEngine ../ServerEngine/DBInterface ../PublicData ../StaticData ../../Common/Sqlite ../ServerData ../../Common/Mysql ../../Common/protobuf/src ../Message ../LogData ../ServerData ../WatcherClient)
link_directories(../../Common/lib /usr/lib64/mysql)


#消息
set(PROTO Proto)
FILE(GLOB PROTO "../Message/Msg_Account.pb.cc"
"../Message/Msg_Account.pb.h"
"../Message/Msg_Base.pb.h"
"../Message/Msg_Base.pb.cc"
"../Message/Msg_Game.pb.h"
"../Message/Msg_Game.pb.cc"
"../Message/Msg_ID.pb.cc"
"../Message/Msg_ID.pb.h")
"../Message/Msg_Account.pb.h"
"../Message/Msg_Base.pb.h"
"../Message/Msg_Base.pb.cc"
"../Message/Msg_Game.pb.h"
"../Message/Msg_Game.pb.cc"
"../Message/Msg_ID.pb.cc"
"../Message/Msg_ID.pb.h")

#header file code
set(HEADER_CODE_FILE HeaderFiles)
Expand All @@ -38,24 +36,25 @@ source_group(SourceFiles FILES ${SOURCE_CODE_FILE} )

# Target
add_executable(LoginServer
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
${PROTO}
${WATCHER_CLIENT}
${HEADER_CODE_FILE}
${SOURCE_CODE_FILE}
)


if(MSVC)
target_link_libraries(LoginServer ServerEngine protobuf libmysql ws2_32 sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(LoginServer ServerEngine protobuf libmysql ws2_32 sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
else()
target_link_libraries(LoginServer ServerEngine protobuf mysqlclient pthread sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(LoginServer ServerEngine protobuf mysqlclient pthread sqlite3)
ADD_DEFINITIONS(-D_CONSOLE -D_CRT_SECURE_NO_WARNINGS)
endif()


if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -pthread -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -O3 -pthread -std=c++11")
endif()

Loading

0 comments on commit 8009a8f

Please sign in to comment.