Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile md4c into QOwnNotes #3080

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

# BEGIN options
option(QON_QT6_BUILD "Build QOwnNotes with Qt6" OFF)
option(DEV_MODE "Build QOwnNotes in developer mode" OFF)
# END options

if (QON_QT6_BUILD)
Expand All @@ -27,11 +28,6 @@ include_directories(libraries/sonnet/src/core)
#some hunspell settings for windows
include(libraries/sonnet/src/plugins/hunspell/hunspell/CMakeLists.txt)

# noneed for md2html
set(BUILD_MD2HTML_EXECUTABLE FALSE)
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(libraries/md4c EXCLUDE_FROM_ALL)

add_executable(QOwnNotes "")

if (CMAKE_BUILD_TYPE MATCHES Debug)
Expand All @@ -49,7 +45,7 @@ set_target_properties(QOwnNotes PROPERTIES
AUTORCC ON
)

if (UNIX)
if (UNIX AND DEV_MODE)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(QOwnNotes PRIVATE
-Wall -Wextra -pedantic -Wno-gnu-zero-variadic-macro-arguments -Wno-error=deprecated-declarations
Expand Down Expand Up @@ -475,6 +471,13 @@ list(APPEND SOURCE_FILES
libraries/sonnet/src/plugins/hunspell/hunspell/src/parsers/xmlparser.hxx
)

# md4c
list(APPEND SOURCE_FILES
libraries/md4c/src/md4c.c
libraries/md4c/src/md4c-html.c
libraries/md4c/src/entity.c
)

# Translation files
SET(QON_TS_FILES
languages/QOwnNotes_en.ts
Expand Down Expand Up @@ -573,7 +576,6 @@ target_link_libraries(QOwnNotes PRIVATE
Botan::Botan
fakevim
Google::DiffMatchPatch
md4c-html
)

if (USE_QLITEHTML)
Expand Down
Loading