From d5a8cd3f9c3bf65e2bf6a19380f7158fd62b6e48 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 7 Sep 2019 22:31:45 +0800 Subject: [PATCH] 1 --- server/gameserver/CMakeLists.txt | 82 ++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 server/gameserver/CMakeLists.txt diff --git a/server/gameserver/CMakeLists.txt b/server/gameserver/CMakeLists.txt new file mode 100644 index 0000000..a04d277 --- /dev/null +++ b/server/gameserver/CMakeLists.txt @@ -0,0 +1,82 @@ +project(gameserver) +cmake_minimum_required(VERSION 2.8) + +set(GAME_ID 9502) + +set(CMAKE_BUILD_TYPE "Debug") +set(CMAKE_BUILD_TYPE "Release") +set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -std=gnu++11 -DGAME_ID=${GAME_ID}") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID}") + +include_directories( + AFTER + ../../third_party/a8engine + /usr/include/mysql + /usr/include/jsoncpp + /usr/include/hiredis + /usr/include/eigen3 + /usr/include/glm + ../../third_party + . +) + +link_directories( + /usr/lib64/mysql + /usr/local/lib +) + +aux_source_directory(../../third_party/a8engine/a8 + SRC_LIST +) + +aux_source_directory(../../third_party/framework/cpp + 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 + COMMAND touch -a metatable.pb.h + COMMAND touch -a metatable.pb.cc + ) +aux_source_directory(. + SRC_LIST +) + +set(EXECUTABLE_OUTPUT_PATH + ${PROJECT_BINARY_DIR}/../bin +) + +add_executable( + gameserver ${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,metatable --python_out=../tools/robot/virtualclient +) +add_dependencies(gameserver script_pb_protocol) + +target_link_libraries( + gameserver + pthread + mysqlclient + protobuf + rt + dl + util + crypto + ssl + jsoncpp + curl + hiredis + tinyxml2 + tcmalloc +)