summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorradhitya <alif@radhitya.org>2026-06-25 12:23:26 +0700
committerradhitya <alif@radhitya.org>2026-06-25 22:51:07 +0700
commitf6250699a5464796693d6bb637e8cf6de26bbef5 (patch)
treed951bebac4add181f79806f1f9812af1e0e49b92 /CMakeLists.txt
parentfffc86850b895a2a1d4d673943a05e53ada18a6c (diff)
site config, frontmatter, readme
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt62
1 files changed, 62 insertions, 0 deletions
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"
+)
+