2018-01-26 02:33:58 +01:00
|
|
|
cmake_minimum_required (VERSION 3.7)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2018-02-10 12:35:06 +01:00
|
|
|
project (mastorss
|
2018-02-10 13:48:33 +01:00
|
|
|
VERSION 0.2.2
|
2018-01-26 02:33:58 +01:00
|
|
|
LANGUAGES CXX
|
|
|
|
)
|
2018-02-10 10:01:17 +01:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2018-02-10 12:35:06 +01:00
|
|
|
include_directories(${MY_SOURCE_DIR}/src)
|
|
|
|
include_directories(${PROJECT_BINARY_DIR})
|
|
|
|
|
|
|
|
# Write version in header
|
|
|
|
configure_file (
|
|
|
|
"${PROJECT_SOURCE_DIR}/src/version.hpp.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/version.hpp"
|
|
|
|
)
|
|
|
|
|
2018-02-10 10:01:17 +01:00
|
|
|
include(FindCURL)
|
|
|
|
find_package(CURL REQUIRED)
|
2018-01-26 02:33:58 +01:00
|
|
|
|
2018-02-10 12:35:06 +01:00
|
|
|
add_executable(mastorss src/mastorss.cpp src/http.cpp)
|
|
|
|
target_link_libraries(mastorss mastodon-cpp boost_system boost_filesystem ssl crypto ${CURL_LIBRARIES} curlpp)
|
|
|
|
install(TARGETS mastorss DESTINATION ${CMAKE_INSTALL_BINDIR})
|