mastorss/src/CMakeLists.txt

26 lines
844 B
CMake
Raw Normal View History

2019-12-16 15:21:06 +01:00
include(GNUInstallDirs)
2019-12-20 01:13:19 +01:00
# The minimum versions should be in Debian oldstable, if possible.
find_package(Boost 1.62 REQUIRED COMPONENTS system filesystem)
find_package(jsoncpp 1.7 REQUIRED CONFIG)
find_package(CURL 7.52 REQUIRED)
find_package(Threads REQUIRED)
find_package(restclient-cpp 0.5 REQUIRED CONFIG)
find_package(mastodon-cpp REQUIRED CONFIG)
2019-12-16 15:21:06 +01:00
2019-12-20 01:13:19 +01:00
# Write version in header.
2019-12-16 15:21:06 +01:00
configure_file (
2019-12-20 01:13:19 +01:00
"${PROJECT_SOURCE_DIR}/src/version.hpp.in"
"${PROJECT_BINARY_DIR}/version.hpp")
include_directories("${PROJECT_BINARY_DIR}")
2019-12-16 15:21:06 +01:00
file(GLOB sources *.cpp)
add_executable(mastorss ${sources})
target_link_libraries(mastorss
2019-12-20 01:13:19 +01:00
mastodon-cpp::mastodon-cpp Boost::system Boost::filesystem restclient-cpp)
install(TARGETS mastorss DESTINATION "${CMAKE_INSTALL_BINDIR}")
2019-12-16 15:21:06 +01:00
install(FILES watchwords.json
2019-12-20 01:13:19 +01:00
DESTINATION "${CMAKE_INSTALL_DATADIR}/mastorss")