-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
83 lines (68 loc) · 1.8 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
cmake_minimum_required(VERSION 3.25)
project(simian VERSION 0.4.1 DESCRIPTION "monkeytype in terminal")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Debug)
find_package(PkgConfig REQUIRED)
pkg_search_module(OPENSSL REQUIRED openssl)
if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIRS})
message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
else()
# Error; with REQUIRED, pkg_search_module() will throw an error by it's own
endif()
include(FetchContent)
include(ExternalProject)
FetchContent_Declare(rapidfuzz
GIT_REPOSITORY https://github.com/maxbachmann/rapidfuzz-cpp.git
GIT_TAG main
)
FetchContent_MakeAvailable(rapidfuzz)
ExternalProject_Add(rapidfuzz-cpp
PREFIX libs
GIT_REPOSITORY https://github.com/maxbachmann/rapidfuzz-cpp.git
GIT_TAG main
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
ExternalProject_Add(cpp-httplib
PREFIX libs
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git
GIT_TAG master
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
ExternalProject_Add(rapidjson
PREFIX libs
GIT_REPOSITORY https://github.com/Tencent/rapidjson.git
GIT_TAG master
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
# Create an executable
add_executable(${PROJECT_NAME}
src/simian.cc
)
# Specify includes
target_include_directories(${PROJECT_NAME} PRIVATE
.
)
# Linking libraries
target_link_libraries(${PROJECT_NAME} PRIVATE
ncursesw
tinfo
ssl
crypto
rapidfuzz::rapidfuzz
)
# These are output from ncursesw5-config --cflags --libs
add_compile_definitions(DEFAULT_SOURCE XOPEN_SOURCE=600)
set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON
)