epubgrep/CMakeLists.txt

34 lines
817 B
CMake

cmake_minimum_required(VERSION 3.12...3.18)
# Global build options.
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
set(XGETTEXT_CMD "xgettext" CACHE STRING "The command for xgettext.")
project(epubgrep
VERSION 0.0.0
DESCRIPTION "Search tool for EPUB ebooks"
LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
# Project build options.
option(WITH_TESTS "Compile tests." NO)
option(GENERATE_POT "Generate / Update .pot file" YES)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(cmake/debug_flags.cmake)
find_package(Boost 1.75.0 REQUIRED COMPONENTS program_options locale)
find_package(Gettext REQUIRED)
add_subdirectory(src)
if(WITH_TESTS)
add_subdirectory(tests)
endif()
add_subdirectory(translations)