-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·48 lines (38 loc) · 1.54 KB
/
Copy pathCMakeLists.txt
File metadata and controls
executable file
·48 lines (38 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.6)
project(server)
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
message("-- current platform: Linux ")
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
message("-- current platform: Windows ")
endif()
# 设置输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/run)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
# 禁止在输出目录后面自动添加构建类型目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})
include_directories(
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/common/db
${CMAKE_SOURCE_DIR}/common/message
${CMAKE_SOURCE_DIR}/lua-5.3.6/
${CMAKE_SOURCE_DIR}/thirdparty
${CMAKE_SOURCE_DIR}/framework/base
${CMAKE_SOURCE_DIR}/framework/shm
${CMAKE_SOURCE_DIR}/framework/net
${CMAKE_SOURCE_DIR}/framework/thread
${CMAKE_SOURCE_DIR}/framework/std
${CMAKE_SOURCE_DIR}/framework/lua
${CMAKE_SOURCE_DIR}/framework/db
)
add_subdirectory(lua-5.3.6)
add_subdirectory(framework)
add_subdirectory(gameserver)
add_subdirectory(proxyserver)
add_subdirectory(dbserver)
add_subdirectory(test)