pica/CMakeLists.txt

33 lines
805 B
CMake
Raw Normal View History

2023-11-21 22:19:08 +00:00
cmake_minimum_required(VERSION 3.5)
project(pica
VERSION 0.0.1
LANGUAGES CXX
)
2023-11-21 14:24:12 +00:00
2023-12-07 20:32:43 +00:00
cmake_policy(SET CMP0076 NEW) #allow adding sources from subdir
cmake_policy(SET CMP0079 NEW) #allow linking from subdirs
2023-11-21 22:19:08 +00:00
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
2023-11-21 22:19:08 +00:00
2023-11-23 19:57:32 +00:00
find_package(nlohmann_json REQUIRED)
find_package(FCGI REQUIRED)
2023-11-21 14:24:12 +00:00
add_executable(pica main.cpp)
2023-11-21 22:19:08 +00:00
target_include_directories(pica PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(server)
add_subdirectory(request)
add_subdirectory(response)
add_subdirectory(stream)
2023-12-07 20:32:43 +00:00
add_subdirectory(database)
2023-11-21 22:19:08 +00:00
2023-11-23 19:57:32 +00:00
target_link_libraries(pica PRIVATE
FCGI::FCGI
FCGI::FCGI++
2023-11-23 19:57:32 +00:00
nlohmann_json::nlohmann_json
2023-11-21 22:19:08 +00:00
)
2023-11-21 14:24:12 +00:00
install(TARGETS pica RUNTIME DESTINATION bin)