summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-01-01 13:24:33 -0600
committersanine <sanine.not@pm.me>2022-01-01 13:24:33 -0600
commit7b78b6986e714cbd7653b89287b928974eb5ee4f (patch)
treeb6334336f722e44bf3020e316976ed5ed3b85ba0 /CMakeLists.txt
initial commit
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..4e707b6
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,37 @@
+cmake_minimum_required(VERSION 3.2)
+project(honeysuckle
+ VERSION 0.1.0
+ DESCRIPTION "A zero-dependency static site generator")
+
+find_package(Lua51 REQUIRED)
+
+set(SRC_ROOT ${CMAKE_SOURCE_DIR}/src)
+include_directories(
+ ${LUA_INCLUDE_DIR}
+ ${SRC_ROOT}/markdown
+ ${SRC_ROOT}/tinydir
+ ${SRC_ROOT}/honeysuckle)
+
+set(MD4C_SOURCES
+ ${SRC_ROOT}/markdown/md4c.c
+ ${SRC_ROOT}/markdown/md4c-html.c
+ ${SRC_ROOT}/markdown/entity.c)
+
+set(HONEYSUCKLE_SOURCES
+ ${SRC_ROOT}/honeysuckle/hs_create_table.c
+ ${SRC_ROOT}/honeysuckle/hs_parse_args.c
+ ${SRC_ROOT}/honeysuckle/hs_process_table.c
+ ${SRC_ROOT}/honeysuckle/hs_pushstring.c
+ ${SRC_ROOT}/honeysuckle/hs_throw_error.c
+ ${SRC_ROOT}/honeysuckle/hs_traceback.c
+ ${SRC_ROOT}/honeysuckle/hs_type_to_string.c)
+
+add_executable(argent
+ ${SRC_ROOT}/argent.c
+ ${SRC_ROOT}/options.c
+ ${MD4C_SOURCES}
+ ${HONEYSUCKLE_SOURCES})
+set_target_properties(argent PROPERTIES
+ C_STANDARD 99
+ CMAKE_C_FLAGS "-Wall -Wextra -Werror -Wfatal-errors -Wpedantic")
+target_link_libraries(argent ${LUA_LIBRARIES})