include(GNUInstallDirs)
configure_file(fs-compat.hpp.in fs-compat.hpp @ONLY)
file(GLOB_RECURSE sources_src *.cpp)
file(GLOB_RECURSE headers_src *.hpp)
# Library for the main executable, the generators and the test.
add_library(fediblock STATIC
"${sources_src}" "${headers_src}")
unset(sources_src)
unset(headers_src)
target_include_directories(fediblock
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(fediblock
PUBLIC
PkgConfig::cgicc
nlohmann_json
std::filesystem
PkgConfig::libgit2
CURL::libcurl)
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME}
PRIVATE fediblock)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")