2022-03-05 12:44:06 +02:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
|
|
|
|
project(db CXX)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE sources
|
|
|
|
src/*.cpp src/*.h
|
|
|
|
)
|
|
|
|
|
2022-03-21 10:27:28 +02:00
|
|
|
# Add the src directory to the include path
|
2022-03-05 12:44:06 +02:00
|
|
|
include_directories(src/)
|
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME} ${sources})
|
|
|
|
|
2022-03-09 21:30:51 +02:00
|
|
|
# Find dependencies
|
|
|
|
find_package(Boost REQUIRED)
|
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
target_link_libraries (${PROJECT_NAME} PRIVATE ${Boost_LIBRARIES} ${Boost_SYSTEM_LIBRARY})
|
2022-03-05 12:44:06 +02:00
|
|
|
|
2022-03-09 21:30:51 +02:00
|
|
|
# Pthreads
|
|
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
2022-03-05 12:44:06 +02:00
|
|
|
|
2023-05-01 08:10:00 +03:00
|
|
|
# LibBSD
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE bsd)
|
|
|
|
|
2022-03-09 21:30:51 +02:00
|
|
|
# Libevent
|
|
|
|
find_package(Libevent CONFIG REQUIRED)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE libevent::core libevent::extra libevent::pthreads)
|
2022-03-05 12:44:06 +02:00
|
|
|
|
2022-11-27 14:36:04 +02:00
|
|
|
# effolkronium/random
|
|
|
|
find_package(effolkronium_random CONFIG REQUIRED)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE effolkronium_random)
|
|
|
|
|
2022-03-09 21:30:51 +02:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE libpoly libsql libthecore)
|