-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
47 lines (36 loc) · 1.16 KB
/
Copy pathCMakeLists.txt
File metadata and controls
47 lines (36 loc) · 1.16 KB
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
cmake_minimum_required(VERSION 3.19)
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
string(STRIP ${VER_RAW} VER)
project(
checkpoint
DESCRIPTION "Tiny reverse proxy that attempts to block AI scrapers"
VERSION ${VER}
)
set(CHECKPOINT_VERSION ${VER})
set(PISTACHE_BUILD_TESTS OFF)
set(PISTACHE_BUILD_FUZZ OFF)
add_subdirectory(subprojects/pistache)
add_subdirectory(subprojects/fmt)
add_subdirectory(subprojects/tinylates)
add_subdirectory(subprojects/glaze)
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
set(CMAKE_CXX_STANDARD 23)
add_executable(checkpoint ${SRCFILES})
add_compile_options(-Wno-deprecated-declarations -Wno-deprecated)
add_compile_definitions(CHECKPOINT_VERSION="${CHECKPOINT_VERSION}")
find_package(PkgConfig REQUIRED)
pkg_check_modules(deps IMPORTED_TARGET openssl re2 libmagic)
target_include_directories(checkpoint
PRIVATE
"./subprojects/pistache/include"
"./subprojects/glaze/include"
"./subprojects/tinylates/include"
"./subprojects/pistache/subprojects/cpp-httplib"
"./subprojects/pistache/subprojects/hinnant-date/include"
)
target_link_libraries(checkpoint
PkgConfig::deps
pistache
fmt
tinylates
)