From c1e6dba2f7ec7472005ef6c87d8d2c60f71a4d3a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 18 Sep 2021 11:10:42 +0800 Subject: [PATCH] 1 --- server/gameserver/CMakeLists.txt | 47 ++++++++++++++------------------ 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/server/gameserver/CMakeLists.txt b/server/gameserver/CMakeLists.txt index 1bf75ad..67cb1d2 100644 --- a/server/gameserver/CMakeLists.txt +++ b/server/gameserver/CMakeLists.txt @@ -89,41 +89,36 @@ add_custom_command(TARGET script_pb_protocol ) add_dependencies(gameserver${GAME_ID} script_pb_protocol) +target_link_libraries( + gameserver${GAME_ID} + pthread + mysqlclient + protobuf + rt + dl + util + crypto + ssl + jsoncpp + curl + hiredis + tinyxml2 + ) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") target_link_libraries( gameserver${GAME_ID} - pthread - mysqlclient - protobuf - rt - dl - util - crypto - ssl - jsoncpp - curl - hiredis - tinyxml2 - #tcmalloc - backtrace behaviac_gcc_debug ) else() target_link_libraries( gameserver${GAME_ID} - pthread - mysqlclient - protobuf - rt - dl - util - crypto - ssl - jsoncpp - curl - hiredis - tinyxml2 tcmalloc behaviac_gcc_release ) endif() +if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0.0") + target_link_libraries( + gameserver${GAME_ID} + backtrace) +endif()