From f6250699a5464796693d6bb637e8cf6de26bbef5 Mon Sep 17 00:00:00 2001 From: radhitya Date: Thu, 25 Jun 2026 12:23:26 +0700 Subject: site config, frontmatter, readme --- CMakeLists.txt | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..496b2cd --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,62 @@ +cmake_minimum_required(VERSION 3.20) +project(ahsi VERSION 0.1.0 LANGUAGES CXX C) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +include(FetchContent) + +FetchContent_Declare( + tomlplusplus + GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git + GIT_TAG v3.4.0 +) +FetchContent_MakeAvailable(tomlplusplus) + +FetchContent_Declare( + json + GIT_REPOSITORY https://github.com/nlohmann/json.git + GIT_TAG v3.11.3 +) +FetchContent_MakeAvailable(json) + +FetchContent_Declare( + inja + GIT_REPOSITORY https://github.com/pantor/inja.git + GIT_TAG v3.4.0 +) + +set(INJA_USE_EMBEDDED_JSON OFF CACHE BOOL "" FORCE) +set(INJA_BUILD_TESTS OFF CACHE BOOL "" FORCE) +set(BUILD_TESTING OFF CACHE BOOL "" FORCE) +set(BUILD_BENCHMARK OFF CACHE BOOL "" FORCE) +set(INJA_INSTALL OFF CACHE BOOL "" FORCE) + +FetchContent_MakeAvailable(inja) + +FetchContent_Declare( + cmark + GIT_REPOSITORY https://github.com/commonmark/cmark.git + GIT_TAG 0.31.1 +) +FetchContent_MakeAvailable(cmark) + +file(GLOB AHSI_SOURCES CONFIGURE_DEPENDS src/*.cpp) + +add_executable(ahsi ${AHSI_SOURCES}) + +target_include_directories(ahsi PRIVATE + src + ${tomlplusplus_SOURCE_DIR}/include + ${json_SOURCE_DIR}/include + ${inja_SOURCE_DIR}/include +) + +target_link_libraries(ahsi PRIVATE cmark) + +set_target_properties(ahsi PROPERTIES + VERSION ${PROJECT_VERSION} + OUTPUT_NAME "ahsi" +) + -- cgit v1.2.3