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.1.2 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) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) include(cmake/debug_flags.cmake) # All dependencies except test dependencies. find_package(Boost 1.65.0 REQUIRED COMPONENTS locale program_options regex) find_package(Gettext REQUIRED) find_package(Filesystem REQUIRED COMPONENTS Final Experimental) find_package(LibArchive 3.2 REQUIRED) find_package(fmt 4 REQUIRED CONFIG) add_subdirectory(src) if(WITH_TESTS) add_subdirectory(tests) endif() add_subdirectory(translations) add_subdirectory(man)