-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (45 loc) · 1.1 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
55
56
cmake_minimum_required(VERSION 3.15)
project(hyperwall)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(PROJECT_IMPLEMENTATIONS
src/impl/FFmpeg.cpp
src/impl/Sources.cpp
src/impl/Hyperwall.cpp
)
set(CMAKE_CXX_FLAGS "-O3")
# This project
include_directories(include)
# OpenCV
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )
# argparse
find_package(argparse REQUIRED)
# spdlog
find_package(spdlog REQUIRED)
# catch2
find_package(Catch2 REQUIRED)
# httplib
find_package(httplib REQUIRED)
# init all executables
foreach(exe Sender Receiver SenderWeb)
add_executable(${exe} src/${exe}.cpp ${PROJECT_IMPLEMENTATIONS})
# Linking
target_link_libraries(${exe}
${OpenCV_LIBS}
argparse::argparse
spdlog::spdlog
httplib::httplib
)
endforeach()
# Tests
enable_testing()
foreach(test ffmpeg utils hyperwall settings)
add_executable(test_${test} src/test/${test}.cpp ${PROJECT_IMPLEMENTATIONS})
target_link_libraries(test_${test}
${OpenCV_LIBS}
spdlog::spdlog
Catch2::Catch2WithMain
)
add_test(NAME ${test} COMMAND test_${test})
endforeach()