mastorss/CMakeLists.txt

41 lines
1.0 KiB
CMake
Raw Normal View History

2019-12-16 15:21:06 +01:00
# Support version 3.9 and above, but use policy settings up to 3.14.
# 3.9 is needed for project description.
cmake_minimum_required(VERSION 3.9...3.14)
# Ranges are supported from 3.12, set policy to current for < 3.12.
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
# Global build options.
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
2018-02-10 12:35:06 +01:00
project (mastorss
2019-12-16 15:21:06 +01:00
VERSION 0.9.9999
DESCRIPTION "Another RSS to Mastodon bot."
LANGUAGES CXX)
2018-02-10 10:01:17 +01:00
2019-12-16 15:21:06 +01:00
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
2018-02-10 12:35:06 +01:00
2019-12-16 15:21:06 +01:00
# Project build options.
option(WITH_MAN "Compile and install manpage." YES)
option(WITH_TESTS "Compile tests." NO)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
2018-05-13 06:59:08 +02:00
2019-12-16 15:21:06 +01:00
include(debug_flags)
2018-05-13 06:59:08 +02:00
2019-12-16 15:21:06 +01:00
add_subdirectory(src)
2018-05-13 06:59:08 +02:00
2019-12-16 15:21:06 +01:00
if(WITH_MAN)
add_subdirectory(man)
endif()
2018-02-10 12:35:06 +01:00
2019-12-16 15:21:06 +01:00
# if(WITH_TESTS)
# add_subdirectory(tests)
# endif()
2018-04-14 13:15:05 +02:00
2019-12-16 15:21:06 +01:00
# include(cmake/packages.cmake)