-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (38 loc) · 1.09 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.10)
project(multicam_viewer VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(FetchContent)
include(cmake/CPM.cmake)
include(cmake/CompilerWarnings.cmake)
include(cmake/Sanitizers.cmake)
# =========== Config ===========
set(SERVER_BIN_NAME server)
set(PIS_BIN_NAME pis)
# CPM Packages
CPMAddPackage("gh:fmtlib/fmt#7.1.3")
CPMAddPackage("gh:nlohmann/[email protected]")
CPMAddPackage("gh:catchorg/[email protected]")
# Dependencies
find_package(OpenCV REQUIRED)
find_package(Boost REQUIRED)
# Libraries
set(LIBRARIES
fmt::fmt
nlohmann_json::nlohmann_json
${OpenCV_LIBS}
${Boost_LIBRARIES}
CACHE INTERNAL ""
)
# Include dirs
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
# ==============================
include_directories(src)
add_subdirectory(src)
add_subdirectory(tests)
enable_compiler_warnings(${SERVER_BIN_NAME})
enable_compiler_warnings(${PIS_BIN_NAME})
enable_sanitizers(${SERVER_BIN_NAME})
enable_sanitizers(${PIS_BIN_NAME})