-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
29 lines (22 loc) · 1010 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.24)
project(Chat)
include(cmake/env.cmake)
OPTION (ENABLE_UNIVERSAL_BUILD "ENABLE UNIVERSAL BUILD" OFF)
OPTION (ENABLE_CLIENT "build chat client" ON)
OPTION (ENABLE_SERVER "build chat server" ON)
include_directories("${PROJECT_SOURCE_DIR}/common/")
add_subdirectory(logger)
if (ENABLE_CLIENT)
add_subdirectory(client)
endif()
if (ENABLE_SERVER)
add_subdirectory(gate_server)
endif()
##################### Show Configuration Summary ######################
MESSAGE(STATUS "===============================================================")
MESSAGE(STATUS "================ Configuration Summary ======================")
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS "Build type Flags: ${CMAKE_BUILD_TYPE_FLAGS}")
MESSAGE(STATUS "C++ compile flags: ${CMAKE_CXX_FLAGS}")
MESSAGE(STATUS "Build Chat Client: ${ENABLE_CLIENT}")
MESSAGE(STATUS "Build Chat Server: ${ENABLE_SERVER}")