summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 78e73ad36800cff230f26b11f7b94238b4c81282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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(CARGS_SOURCES
  ${SRC_ROOT}/cargs/cargs.c)

add_executable(argent
  ${SRC_ROOT}/argent.c
  ${SRC_ROOT}/options.c
  ${SRC_ROOT}/bindings.c
  ${SRC_ROOT}/logging.c
  ${MD4C_SOURCES}
  ${CARGS_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})