diff options
author | lns <matzeton@googlemail.com> | 2021-10-20 19:58:38 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2021-10-20 19:58:38 +0200 |
commit | 384724a00be9dbb8f40d295f99b9c6bcfb48b387 (patch) | |
tree | 6e053365bb995bf675397368281c0a3ff92bd9fc /CMakeLists.txt | |
parent | 7b01dd8e4b1779e4c4dd782dbec87acce0f4754b (diff) |
Added MD4C support to render HTML from Markdown text.
* additional blog metadata properties
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b107660..1de9b72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,14 +6,27 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g3 -fpic -fno-omit-frame-pointer -fno-rtti -ffunctio set(CMAKE_CXX_FLAGS_RELEASE "-Os -fpic -fomit-frame-pointer -ffunction-sections -fdata-sections -flto") set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections") -set(INJA_SRCDIR "${PROJECT_SOURCE_DIR}/deps/inja" CACHE STRING "Path to the inja source directory.") +set(INJA_SRCDIR "${PROJECT_SOURCE_DIR}/deps/inja" CACHE STRING + "Path to the inja source directory.") if(NOT EXISTS "${INJA_SRCDIR}/single_include/inja/inja.hpp") message(FATAL_ERROR "inja missing") endif() -include_directories(${CPP_HTTPLIB_SRCDIR} ${INJA_SRCDIR}/single_include ${INJA_SRCDIR}/third_party/include) +set(MD4C_SRCDIR "${PROJECT_SOURCE_DIR}/deps/md4c/src" CACHE STRING + "Path to the md4c source directory.") +if(NOT EXISTS "${MD4C_SRCDIR}/md4c-html.h") + message(FATAL_ERROR "md4c missing") +endif() + +include_directories(${CPP_HTTPLIB_SRCDIR} ${INJA_SRCDIR}/single_include + ${INJA_SRCDIR}/third_party/include + ${MD4C_SRCDIR}) +set(MD4C_SOURCES "${MD4C_SRCDIR}/entity.c" + "${MD4C_SRCDIR}/md4c.c" + "${MD4C_SRCDIR}/md4c-html.c") + file(GLOB_RECURSE SOURCES "src/*.cpp") -add_executable(cpp-web ${SOURCES}) +add_executable(cpp-web ${MD4C_SOURCES} ${SOURCES}) #target_compile_definitions(cpp-web PUBLIC CPPHTTPLIB_THREAD_POOL_COUNT=4) #target_compile_options(cpp-web PUBLIC "-std=c++14") if(CMAKE_BUILD_TYPE MATCHES Release) |