2018-01-26 02:33:58 +01:00
|
|
|
cmake_minimum_required (VERSION 3.7)
|
2018-02-10 12:35:06 +01:00
|
|
|
project (mastorss
|
2018-03-15 13:20:26 +01:00
|
|
|
VERSION 0.4.0
|
2018-01-26 02:33:58 +01:00
|
|
|
LANGUAGES CXX
|
|
|
|
)
|
2018-02-10 10:01:17 +01:00
|
|
|
|
2018-02-21 16:13:33 +01:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
include(FindCURL)
|
|
|
|
include(FindBoost)
|
|
|
|
|
2018-02-10 10:01:17 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2018-02-21 16:13:33 +01:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src)
|
2018-02-10 12:35:06 +01:00
|
|
|
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
|
|
|
find_package(CURL REQUIRED)
|
2018-02-21 16:13:33 +01:00
|
|
|
include_directories(${CURL_INCLUDE_DIR})
|
2018-02-20 23:29:55 +01:00
|
|
|
find_package(Boost REQUIRED COMPONENTS system filesystem)
|
2018-02-21 16:13:33 +01:00
|
|
|
include_directories(${Boost_INCLUDE_DIRS})
|
|
|
|
link_directories(${Boost_LIBRARY_DIRS})
|
|
|
|
add_definitions(${Boost_DEFINITIONS})
|
2018-01-26 02:33:58 +01:00
|
|
|
|
2018-02-20 23:29:55 +01:00
|
|
|
file(GLOB sources src/*.cpp)
|
|
|
|
add_executable(mastorss ${sources})
|
|
|
|
target_link_libraries(mastorss mastodon-cpp ${Boost_LIBRARIES} ssl crypto ${CURL_LIBRARIES} curlpp)
|
2018-02-10 12:35:06 +01:00
|
|
|
install(TARGETS mastorss DESTINATION ${CMAKE_INSTALL_BINDIR})
|