cmake_minimum_required(VERSION 3.19...3.27) if(${CMAKE_VERSION} VERSION_LESS 3.12) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) endif() project(libfud VERSION 1.0.0 DESCRIPTION "Library of FUD" LANGUAGES CXX C) set(CXX_CPPCHECK "project=build/compile_commands.json;enable=information;force") set(CMAKE_EXPORT_COMPILE_COMMANDS true) add_library(libfud SHARED source/libfud.cpp source/fud_memory.cpp source/fud_c_file.cpp source/fud_string.cpp source/fud_utf8.cpp source/fud_utf8_iterator.cpp ) target_compile_options(libfud PRIVATE ${FUD_WARNINGS}) target_include_directories(libfud PUBLIC include) set_target_properties( libfud PROPERTIES CXX_STANDARD 20 C_STANDARD 23 CXX_EXTENSIONS OFF C_EXTENSIONS OFF CXX_STANDARD_REQUIRED ON) if (FUD_TEST) add_subdirectory(test) endif () if (FUD_DOC) find_package(Doxygen REQUIRED dot OPTIONAL_COMPONENTS mscgen dia) doxygen_add_docs(docs include # CONFIG_FILE "Doxyfile" ) endif()