This commit is contained in:
aozhiwei 2019-12-13 13:16:37 +08:00
parent d1ef912d3e
commit 6169fc61b5
6 changed files with 70 additions and 20 deletions

6
.gitmodules vendored
View File

@ -7,3 +7,9 @@
[submodule "third_party/tools"]
path = third_party/tools
url = git@git.kingsome.cn:server_common/tools.git
[submodule "third_party/behaviac"]
path = third_party/behaviac
url = git@git.kingsome.cn:libs/behaviac.git
[submodule "third_party/recastnavigation"]
path = third_party/recastnavigation
url = git@git.kingsome.cn:libs/recastnavigation.git

View File

@ -8,9 +8,15 @@ else()
message(GAME_ID: ${GAME_ID})
endif()
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++11 -fsanitize=address -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID}")
if (${RELEASE})
set(CMAKE_BUILD_TYPE "Release")
message("release mode")
else()
set(CMAKE_BUILD_TYPE "Debug")
message("debug mode")
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DDEBUG")
include_directories(
AFTER
@ -21,12 +27,16 @@ include_directories(
/usr/include/eigen3
/usr/include/glm
../../third_party
../../third_party/behaviac/inc
../../third_party/recastnavigation/Detour/Include
../../third_party/recastnavigation/DetourTileCache/Include
.
)
link_directories(
/usr/lib64/mysql
/usr/local/lib
../../third_party/behaviac/lib
)
aux_source_directory(../../third_party/a8engine/a8
@ -37,6 +47,14 @@ aux_source_directory(../../third_party/framework/cpp
SRC_LIST
)
aux_source_directory(../../third_party/recastnavigation/Detour/Source
SRC_LIST
)
aux_source_directory(../../third_party/recastnavigation/DetourTileCache/Source
SRC_LIST
)
execute_process(
COMMAND touch -a ss_proto.pb.h
COMMAND touch -a ss_proto.pb.cc
@ -62,18 +80,42 @@ add_custom_command(TARGET script_pb_protocol
)
add_dependencies(masterserver script_pb_protocol)
target_link_libraries(
masterserver
pthread
mysqlclient
protobuf
rt
dl
util
crypto
ssl
jsoncpp
curl
hiredis
tinyxml2
)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(
masterserver
pthread
mysqlclient
protobuf
rt
dl
util
crypto
ssl
jsoncpp
curl
hiredis
tinyxml2
tcmalloc
behaviac_gcc_debug
)
else()
target_link_libraries(
masterserver
pthread
mysqlclient
protobuf
rt
dl
util
crypto
ssl
jsoncpp
curl
hiredis
tinyxml2
tcmalloc
behaviac_gcc_release
)
endif()

@ -1 +1 @@
Subproject commit ee4ceec3d96375f9ca6ba4816ade7508bd570a92
Subproject commit cdb87a3e673aee3401b3e2ffce3ea1a1e6a603b0

1
third_party/behaviac vendored Submodule

@ -0,0 +1 @@
Subproject commit 240414570ee2848291d24ff8d3102dc43d4104a3

@ -1 +1 @@
Subproject commit f7c0890bc84974c2770688378696bd8d74cfa7c2
Subproject commit eb455bb95f97dc506566c443be0c72960ceebabf

1
third_party/recastnavigation vendored Submodule

@ -0,0 +1 @@
Subproject commit 35ca2eadc32161cd6ab479d1a2626759a73bb5a3