commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.62k stars 539 forks source link

Modernize CMake #374

Open Symbitic opened 3 years ago

Symbitic commented 3 years ago

This pull request updates the cmake build system to use more modern features. The minimum required version is v3.12, which is found in all three GitHub runners.

Changes:

Mikenux commented 2 years ago

Hello!

In Evince (Document Viewer), there is work in progress to support markdown files (via md -> html -> pdf conversion; see https://gitlab.gnome.org/GNOME/evince/-/merge_requests/391).

I think the build option CMARK_EXE is what is needed to only build cmark as library for a flatpak build. So, it would be nice to have this. Thanks!

jgm commented 2 years ago

@nwellnhof is there no build configuration currently accessible that allows building without creating the executable?

It has been a while; I don't recall all the reasons this wasn't merged, but I think they include:

I see the value in something like CMARK_EXE. Maybe it's possible to extract that part of this patch without requiring more than cmake 3.7?

Mikenux commented 2 years ago

@jgm: I now build with '-BUILDDIR=build' option in the json file, but '-DCMAKE_INSTALL_PREFIX=/app' does not work. However, if I edit the Makefile by removing the '?' after 'INSTALL_PREFIX' and by adding '/app' after '=', it works (I edit the file, then recompress in personal archive). Did I use the wrong option?