This repository has been archived on 2021-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
backend/src/CMakeLists.txt

39 lines
928 B
CMake

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
ICU::uc
fmt::fmt
pugixml)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
target_link_libraries(fediblock PUBLIC ${CURL_LIBRARIES})
else()
target_link_libraries(fediblock PUBLIC CURL::libcurl)
endif()
add_executable(${PROJECT_NAME} main.cpp)
target_link_libraries(${PROJECT_NAME}
PRIVATE fediblock)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")