1
0
forked from blue/pica
pica/CMakeLists.txt

41 lines
1.0 KiB
CMake

cmake_minimum_required(VERSION 3.5)
project(pica
VERSION 0.0.1
LANGUAGES CXX
)
set(PROJECT_LICENSE "GPL-3.0")
cmake_policy(SET CMP0076 NEW) #allow adding sources from subdir
cmake_policy(SET CMP0079 NEW) #allow linking from subdirs
include(GNUInstallDirs)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
set(PICA_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
find_package(nlohmann_json REQUIRED)
find_package(FCGI REQUIRED)
add_executable(pica main.cpp)
target_include_directories(pica PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(pica PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_subdirectory(server)
add_subdirectory(request)
add_subdirectory(response)
add_subdirectory(stream)
add_subdirectory(database)
add_subdirectory(utils)
configure_file(config.h.in config.h @ONLY)
target_link_libraries(pica PRIVATE
FCGI::FCGI
FCGI::FCGI++
nlohmann_json::nlohmann_json
)
install(TARGETS pica RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})