gitea2rss/CMakeLists.txt

31 lines
672 B
CMake
Raw Permalink Normal View History

2020-10-27 12:06:37 +01:00
# IMPORTED target CURL::libcurl needs 3.12.
2021-04-25 10:41:02 +02:00
cmake_minimum_required(VERSION 3.12...3.18)
2019-08-09 21:07:10 +02:00
2019-04-17 00:17:26 +02:00
project(gitea2rss
2021-04-25 10:41:02 +02:00
VERSION 0.7.0
2020-10-27 12:06:37 +01:00
DESCRIPTION "Generates RSS feeds from Gitea releases or tags."
2019-08-09 21:07:10 +02:00
LANGUAGES CXX)
2019-04-17 00:17:26 +02:00
2019-08-09 21:07:10 +02:00
option(WITH_MAN "Compile and install manpage." YES)
option(WITH_TESTS "Compile tests." NO)
2019-04-17 00:17:26 +02:00
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
2020-10-24 15:41:07 +02:00
include(cmake/debug_flags.cmake)
2019-04-17 00:17:26 +02:00
find_package(PkgConfig REQUIRED)
pkg_check_modules(jsoncpp REQUIRED IMPORTED_TARGET jsoncpp)
2020-10-24 16:59:41 +02:00
find_package(CURL 7.56 REQUIRED)
2019-04-17 00:17:26 +02:00
2019-08-09 21:07:10 +02:00
add_subdirectory(src)
2019-04-17 00:17:26 +02:00
if (WITH_MAN)
2019-08-09 21:07:10 +02:00
add_subdirectory(man)
2019-04-17 00:17:26 +02:00
endif()
if(WITH_TESTS)
2019-08-09 21:07:10 +02:00
add_subdirectory(tests)
endif()