From 95279fbf6dfeb43d80590740a9259d7caa614177 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 5 Feb 2022 17:44:26 +0000 Subject: Add tdemarkdown part - embeddable lightweight markdown viewing component. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TDEMarkdown is based on the md4c library and using TDEHTML for rendering its output. For enhanced safety, on HTML widget is turned off everything we don't need for viewing. It integrates nicely into Konqueror and supports both Commonmark and GitHub markdown syntaxes. Signed-off-by: Mavridis Philippe Prepare to merge tdemarkdown into tdelibs. Signed-off-by: Slávek Banko --- tdemarkdown/CMakeLists.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tdemarkdown/CMakeLists.txt (limited to 'tdemarkdown/CMakeLists.txt') diff --git a/tdemarkdown/CMakeLists.txt b/tdemarkdown/CMakeLists.txt new file mode 100644 index 000000000..38df3b6e0 --- /dev/null +++ b/tdemarkdown/CMakeLists.txt @@ -0,0 +1,67 @@ +########################################### +# # +# Copyright (C) 2022 Mavridis Philippe # +# # +# # +# Improvements and feedback are welcome # +# # +# Released under GNU GPL v2 or greater. # +# # +########################################### + +### Header and library directories ######## +# +include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdehtml + ${CMAKE_SOURCE_DIR}/tdeui + ${CMAKE_SOURCE_DIR}/tdeutils + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/md4c/src +) + +include_directories( SYSTEM + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +### Build libtdemarkdown (kpart) ########### +# +tde_add_kpart( libtdemarkdown + AUTOMOC + SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/md4c/src/entity.c + ${CMAKE_CURRENT_SOURCE_DIR}/md4c/src/md4c.c + ${CMAKE_CURRENT_SOURCE_DIR}/md4c/src/md4c-html.c + markdown_part.cpp + LINK + tdeparts-shared tdehtml-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +### Install part .desktop entry ############# +# +tde_create_translated_desktop( + SOURCE markdown_part.desktop + DESTINATION ${SERVICES_INSTALL_DIR} + PO_DIR tdemarkdown-desktops +) + + +### Install XML-GUI ######################### +# +install( + FILES markdown_part.rc + DESTINATION ${DATA_INSTALL_DIR}/tdemarkdown +) -- cgit v1.2.1