-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (42 loc) · 1.26 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
cmake_minimum_required(VERSION 3.0)
project(lh2ow)
# stuff for compiling and linking with external projects
include_directories(
deps/h2o/include
deps/h2o/deps/cloexec
deps/h2o/deps/brotli/c/include
deps/h2o/deps/golombset
deps/h2o/deps/hiredis
deps/h2o/deps/libgkc
deps/h2o/deps/libyrmcds
deps/h2o/deps/klib
deps/h2o/deps/neverbleed
deps/h2o/deps/picohttpparser
deps/h2o/deps/picotest
deps/h2o/deps/picotls/deps/cifra/src/ext
deps/h2o/deps/picotls/deps/cifra/src
deps/h2o/deps/picotls/deps/micro-ecc
deps/h2o/deps/picotls/include
deps/h2o/deps/quicly/include
deps/h2o/deps/yaml/include
deps/h2o/deps/yoml
)
include(ExternalProject)
ExternalProject_Add(h2o
SOURCE_DIR deps/h2o
PREFIX deps/h2o
BINARY_DIR deps/h2o
STEP_TARGETS build
BUILD_COMMAND cmake --build . --target libh2o
INSTALL_COMMAND cmake -E echo "Skipping install step"
)
# stuff for building our own library
set(CMAKE_C_FLAGS "-Wall -Wextra -O3")
set(CMAKE_C_FLAGS_DEBUG "-Wall -Wextra -Wpedantic -Werror -Og -g")
include_directories(include)
add_library(h2ow-pre STATIC lib/runtime.c lib/settings.c lib/handlers.c lib/run-setup.c lib/utils.c)
# combine our library with others so people don't have to link against them
add_custom_target(h2ow ALL
COMMAND ./combine-libs
DEPENDS h2ow-pre h2o
)