-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (23 loc) · 786 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
32 lines (23 loc) · 786 Bytes
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
cmake_minimum_required(VERSION 3.5.0)
project(desk_cast CXX)
find_package(OpenSSL REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
find_package(absl CONFIG REQUIRED)
set(CMAKE_CXX_STANDARD 20)
# set(CMAKE_CXX_FLAGS "-g -Wall -Werror")
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(OPENSSL_USE_STATIC_LIBS TRUE)
set(Protobuf_USE_STATIC_LIBS ON)
add_subdirectory(proto)
include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(include)
file(GLOB_RECURSE SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME}
cast_proto
protobuf::libprotobuf
protobuf::libprotobuf-lite
${OPENSSL_LIBRARIES}
)