1
This commit is contained in:
parent
db27ea3a14
commit
b0d697159e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*#*
|
136
server/imserver/CMakeLists.txt
Normal file
136
server/imserver/CMakeLists.txt
Normal file
@ -0,0 +1,136 @@
|
||||
project(imserver)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(GAME_ID 2006)
|
||||
|
||||
if (${RELEASE})
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
message("release mode")
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
set(LIB_DIR "ubuntu20.04_g++-9")
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++1z -DGAME_ID=${GAME_ID} -DDEBUG")
|
||||
|
||||
include_directories(
|
||||
AFTER
|
||||
../../third_party/a8
|
||||
../../third_party/f8
|
||||
/usr/include/mysql
|
||||
/usr/include/jsoncpp
|
||||
/usr/include/hiredis
|
||||
/usr/include/glm
|
||||
../../third_party
|
||||
../../third_party/behaviac/inc
|
||||
../../third_party/recastnavigation/Recast/Include
|
||||
../../third_party/recastnavigation/Detour/Include
|
||||
../../third_party/recastnavigation/DetourTileCache/Include
|
||||
behaviac_generated/types
|
||||
behaviac_generated/types/internal
|
||||
.
|
||||
)
|
||||
|
||||
link_directories(
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/a8/a8
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/f8/f8
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/recastnavigation/Recast/Source
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/recastnavigation/Detour/Source
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/recastnavigation/DetourTileCache/Source
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(behaviac_generated/types/internal
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(mtb
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(mt
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
aux_source_directory(buff
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND touch -a cs_proto.pb.h
|
||||
COMMAND touch -a cs_proto.pb.cc
|
||||
COMMAND touch -a cs_msgid.pb.h
|
||||
COMMAND touch -a cs_msgid.pb.cc
|
||||
COMMAND touch -a ss_proto.pb.h
|
||||
COMMAND touch -a ss_proto.pb.cc
|
||||
COMMAND touch -a ss_msgid.pb.h
|
||||
COMMAND touch -a ss_msgid.pb.cc
|
||||
)
|
||||
aux_source_directory(.
|
||||
SRC_LIST
|
||||
)
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH
|
||||
${PROJECT_BINARY_DIR}/../bin
|
||||
)
|
||||
|
||||
add_executable(
|
||||
imserver${GAME_ID} ${SRC_LIST}
|
||||
)
|
||||
|
||||
add_custom_target(script_pb_protocol ALL)
|
||||
add_custom_command(TARGET script_pb_protocol
|
||||
PRE_BUILD
|
||||
COMMAND python ../../third_party/tools/scripts/construct/build_pb.py --cpp_out=. --pb_files=cs_proto,cs_msgid,ss_proto,ss_msgid)
|
||||
add_dependencies(imserver${GAME_ID} script_pb_protocol)
|
||||
|
||||
target_link_libraries(
|
||||
imserver${GAME_ID}
|
||||
pthread
|
||||
mysqlclient
|
||||
protobuf
|
||||
rt
|
||||
dl
|
||||
util
|
||||
crypto
|
||||
ssl
|
||||
jsoncpp
|
||||
curl
|
||||
hiredis
|
||||
tinyxml2
|
||||
backtrace
|
||||
)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_link_libraries(
|
||||
imserver${GAME_ID}
|
||||
behaviac_gcc_debug
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
imserver${GAME_ID}
|
||||
tcmalloc
|
||||
behaviac_gcc_release
|
||||
)
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user