-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
145 lines (114 loc) · 2.88 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
cmake_minimum_required(VERSION 3.15)
project(testing)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CC_STANDARD 17)
set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
${CMAKE_MODULE_PATH})
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libs/mvfst/_build")
list(APPEND CMAKE_PREFIX_PATH "/usr/local")
find_package(PkgConfig REQUIRED)
include(FetchContent)
# ## ReaderWriterQueue
# FetchContent_Declare(
# readerwriterqueue
# GIT_REPOSITORY https://github.com/cameron314/readerwriterqueue
# GIT_TAG master
# )
# FetchContent_MakeAvailable(readerwriterqueue)
# Octree
pkg_search_module(WEBP REQUIRED libwebp)
pkg_search_module(JPEG REQUIRED libjpeg)
# pkg_search_module(AVIF REQUIRED libavif)
# pkg_search_module(AVIF REQUIRED libavif)
pkg_search_module(TURBOJPEG REQUIRED libturbojpeg)
# pkg_search_module(JSONCPP REQUIRED libjsoncpp)
find_package(Eigen3 3.1.2)
find_package(PCL 1.1.0 REQUIRED)
find_package(OpenCV REQUIRED)
find_package(JsonCpp REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
include_directories(${OpenCV_INCLUDE_DIRS})
link_directories(${TURBOJPEG_LIBDIR})
add_executable(octree src/main.cpp src/common.cpp)
add_executable(hausdorff src/quality_test/hausdorff.cpp)
target_link_libraries(
octree
${WEBP_LIBRARIES}
${JPEG_LIBRARIES}
${PCL_LIBRARIES}
${AVIF_LIBRARIES}
${TURBOJPEG_LIBRARIES}
${JsonCpp_LIBRARIES}
# readerwriterqueue
)
target_link_libraries(
hausdorff
${WEBP_LIBRARIES}
${JPEG_LIBRARIES}
${PCL_LIBRARIES}
${AVIF_LIBRARIES}
${TURBOJPEG_LIBRARIES}
${OpenCV_LIBS}
${JsonCpp_LIBRARIES}
)
## Unix Transport
add_executable(server src/transport/server.cc)
add_executable(client src/transport/man_client.cc)
add_executable(auto_client src/transport/auto_client.cc)
target_link_libraries(
server
pthread
)
target_link_libraries(
client
pthread
)
target_link_libraries(
auto_client
pthread
)
## Quiche (Cloudflare)
add_custom_target(
quiche_rust
COMMAND cd ./../libs/quiche && cargo build --target-dir ./../../third_party_build --features ffi
)
add_executable(quiche_server src/quiche_transport/server.cc)
add_executable(quiche_client src/quiche_transport/client.cc)
add_executable(hello_quiche src/quiche_transport/hello.cc)
add_dependencies(
quiche_server
quiche_rust
)
add_dependencies(
quiche_client
quiche_rust
)
find_library(LIBQUICHE
NAMES quiche
HINTS ./third_party_build/debug
)
target_include_directories(quiche_server PUBLIC ./libs/quiche/quiche/include)
target_include_directories(quiche_client PUBLIC ./libs/quiche/quiche/include)
target_link_libraries(
quiche_server
ssl
crypto
ev
dl
m
pthread
${LIBQUICHE}
)
target_link_libraries(
quiche_client
ssl
crypto
ev
dl
m
pthread
${LIBQUICHE}
)