32 lines
958 B
CMake
32 lines
958 B
CMake
cmake_minimum_required(VERSION 3.12...3.20)
|
|
|
|
# Global build options.
|
|
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
project(libravatarserv
|
|
VERSION 0.8.0
|
|
DESCRIPTION "A simple libravatar server."
|
|
HOMEPAGE_URL "https://schlomp.space/tastytea/libravatarserv"
|
|
LANGUAGES CXX)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
|
|
|
include(cmake/debug_flags.cmake)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(Magick++ REQUIRED IMPORTED_TARGET Magick++)
|
|
pkg_check_modules(libcryptopp IMPORTED_TARGET libcryptopp)
|
|
if(NOT libcryptopp_FOUND)
|
|
# Debian stretch package installs libcrypto++.pc
|
|
pkg_check_modules(libcryptopp REQUIRED IMPORTED_TARGET libcrypto++)
|
|
endif()
|
|
find_package(identiconpp REQUIRED CONFIG)
|
|
find_package(Filesystem REQUIRED COMPONENTS Final Experimental)
|
|
|
|
add_subdirectory(src)
|
|
|
|
include(cmake/packages.cmake)
|