-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
45 lines (35 loc) · 968 Bytes
/
CMakeLists.txt
File metadata and controls
45 lines (35 loc) · 968 Bytes
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
cmake_minimum_required(VERSION 3.23)
project(crawler VERSION 0.1 LANGUAGES CXX)
enable_testing()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# build library from src files
file(GLOB SRC_SOURCES "${CMAKE_SOURCE_DIR}/src/**.cpp")
add_library(crawler_lib STATIC ${SRC_SOURCES})
target_include_directories(crawler_lib PUBLIC
${CMAKE_SOURCE_DIR}/inc
)
# link curl and lexbor
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")
find_package(CURL REQUIRED CONFIG)
find_package(Lexbor REQUIRED)
find_package(OGDF REQUIRED)
find_package(fmt REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
target_link_libraries(crawler_lib
PUBLIC
CURL::libcurl
lexbor::lexbor_static
ogdf::ogdf
fmt::fmt
pybind11::embed
)
# executable
add_executable(crawler_exe src/main.cpp)
target_link_libraries(crawler_exe
PRIVATE
crawler_lib
)
# tests
add_subdirectory(tests)