2020-06-29 03:01:30 +02:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2020-06-29 23:15:14 +02:00
|
|
|
configure_file(fs-compat.hpp.in fs-compat.hpp @ONLY)
|
2020-06-29 06:10:15 +02:00
|
|
|
|
2020-06-29 03:01:30 +02:00
|
|
|
file(GLOB_RECURSE sources_src *.cpp)
|
|
|
|
file(GLOB_RECURSE headers_src *.hpp)
|
2020-07-02 06:54:54 +02:00
|
|
|
# Library for the main executable, the generators and the test.
|
|
|
|
add_library(fediblock STATIC
|
|
|
|
"${sources_src}" "${headers_src}")
|
2020-06-29 03:01:30 +02:00
|
|
|
unset(sources_src)
|
|
|
|
unset(headers_src)
|
|
|
|
|
2020-07-02 06:54:54 +02:00
|
|
|
target_include_directories(fediblock
|
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
2020-06-29 23:15:14 +02:00
|
|
|
|
2020-07-02 06:54:54 +02:00
|
|
|
target_link_libraries(fediblock
|
|
|
|
PUBLIC
|
2020-07-02 00:19:18 +02:00
|
|
|
PkgConfig::cgicc
|
|
|
|
nlohmann_json
|
|
|
|
std::filesystem
|
2020-10-18 03:20:26 +02:00
|
|
|
PkgConfig::libgit2
|
2020-10-28 10:01:33 +01:00
|
|
|
ICU::uc
|
2020-10-30 16:59:14 +01:00
|
|
|
fmt::fmt
|
|
|
|
pugixml)
|
2020-07-08 07:25:31 +02:00
|
|
|
|
|
|
|
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
2020-10-18 03:20:26 +02:00
|
|
|
target_link_libraries(fediblock PUBLIC ${CURL_LIBRARIES})
|
2020-07-08 07:25:31 +02:00
|
|
|
else()
|
2020-10-18 03:20:26 +02:00
|
|
|
target_link_libraries(fediblock PUBLIC CURL::libcurl)
|
2020-07-08 07:25:31 +02:00
|
|
|
endif()
|
2020-06-29 03:01:30 +02:00
|
|
|
|
2020-07-02 06:54:54 +02:00
|
|
|
add_executable(${PROJECT_NAME} main.cpp)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
|
|
PRIVATE fediblock)
|
|
|
|
|
2020-06-29 03:01:30 +02:00
|
|
|
install(TARGETS ${PROJECT_NAME}
|
|
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|