1
This commit is contained in:
parent
b3fe7cce9b
commit
b7aae72085
@ -15,10 +15,15 @@ else()
|
|||||||
message(MASTER_MODE: 0)
|
message(MASTER_MODE: 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_BUILD_TYPE "Debug")
|
if (${RELEASE})
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DMASTER_MODE=${MASTER_MODE}")
|
message("release mode")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DMASTER_MODE=${MASTER_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} -DMASTER_MODE=${MASTER_MODE} -DNDEBUG")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DGAME_ID=${GAME_ID} -DMASTER_MODE=${MASTER_MODE} -DDEBUG")
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
AFTER
|
AFTER
|
||||||
@ -29,12 +34,16 @@ include_directories(
|
|||||||
/usr/include/eigen3
|
/usr/include/eigen3
|
||||||
/usr/include/glm
|
/usr/include/glm
|
||||||
../../third_party
|
../../third_party
|
||||||
|
../../third_party/behaviac/inc
|
||||||
|
../../third_party/recastnavigation/Detour/Include
|
||||||
|
../../third_party/recastnavigation/DetourTileCache/Include
|
||||||
.
|
.
|
||||||
)
|
)
|
||||||
|
|
||||||
link_directories(
|
link_directories(
|
||||||
/usr/lib64/mysql
|
/usr/lib64/mysql
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
|
../../third_party/behaviac/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
aux_source_directory(../../third_party/a8engine/a8
|
aux_source_directory(../../third_party/a8engine/a8
|
||||||
@ -45,6 +54,14 @@ aux_source_directory(../../third_party/framework/cpp
|
|||||||
SRC_LIST
|
SRC_LIST
|
||||||
)
|
)
|
||||||
|
|
||||||
|
aux_source_directory(../../third_party/recastnavigation/Detour/Source
|
||||||
|
SRC_LIST
|
||||||
|
)
|
||||||
|
|
||||||
|
aux_source_directory(../../third_party/recastnavigation/DetourTileCache/Source
|
||||||
|
SRC_LIST
|
||||||
|
)
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND touch -a ss_proto.pb.h
|
COMMAND touch -a ss_proto.pb.h
|
||||||
COMMAND touch -a ss_proto.pb.cc
|
COMMAND touch -a ss_proto.pb.cc
|
||||||
@ -70,16 +87,40 @@ add_custom_command(TARGET script_pb_protocol
|
|||||||
)
|
)
|
||||||
add_dependencies(wsproxy${GAME_ID} script_pb_protocol)
|
add_dependencies(wsproxy${GAME_ID} script_pb_protocol)
|
||||||
|
|
||||||
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
wsproxy${GAME_ID}
|
wsproxy${GAME_ID}
|
||||||
pthread
|
pthread
|
||||||
mysqlclient
|
mysqlclient
|
||||||
protobuf
|
protobuf
|
||||||
rt
|
rt
|
||||||
|
dl
|
||||||
|
util
|
||||||
crypto
|
crypto
|
||||||
ssl
|
ssl
|
||||||
jsoncpp
|
jsoncpp
|
||||||
curl
|
curl
|
||||||
hiredis
|
hiredis
|
||||||
tinyxml2
|
tinyxml2
|
||||||
|
tcmalloc
|
||||||
|
behaviac_gcc_debug
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_link_libraries(
|
||||||
|
wsproxy${GAME_ID}
|
||||||
|
pthread
|
||||||
|
mysqlclient
|
||||||
|
protobuf
|
||||||
|
rt
|
||||||
|
dl
|
||||||
|
util
|
||||||
|
crypto
|
||||||
|
ssl
|
||||||
|
jsoncpp
|
||||||
|
curl
|
||||||
|
hiredis
|
||||||
|
tinyxml2
|
||||||
|
tcmalloc
|
||||||
|
behaviac_gcc_release
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user