diff options
| author | Alif Radhitya <radhitya@noreply.codeberg.org> | 2026-06-25 17:53:21 +0200 |
|---|---|---|
| committer | Alif Radhitya <radhitya@noreply.codeberg.org> | 2026-06-25 17:53:21 +0200 |
| commit | e2ef625c779dffd6a580c0aa8d1d57dcf7abd7eb (patch) | |
| tree | 32c9da33a864c744fede28fe11654fc7bbd479bc /CMakeLists.txt | |
| parent | 829b4e3cf1e59732d0166cbd24d31c93c4095977 (diff) | |
| parent | 85133d6dcaa7b02d67e243ce8df8324e46f4009f (diff) | |
Merge pull request 'farewell adieu rust' (#1) from exp into master
Reviewed-on: https://codeberg.org/radhitya/ahsi/pulls/1
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..947ebcd --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,63 @@ +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 + ${cmark_SOURCE_DIR}/include +) + +target_link_libraries(ahsi PRIVATE cmark) + +set_target_properties(ahsi PROPERTIES + VERSION ${PROJECT_VERSION} + OUTPUT_NAME "ahsi" +) + |
