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

Add build.zig #254

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add build.zig #254

wants to merge 4 commits into from

Conversation

fjebaker
Copy link

Hi! md4c is brilliant and I am using it in some of my little Zig projects. To make my life easier, I forked and added a build.zig so that it's easy for my Zig projects to use md4c.

I thought I might contribute it back, as other Zig users might also be interested in making their lives a little easier too. I wrote the script so that it mimics the CMake build.

You can then build md4c with

zig build

or build md2html with

zig build md2html

This will compile the following

zig-out
├── bin
│   └── md2html
├── include
│   └── md4c.h
└── lib
    ├── libmd4c.so -> libmd4c.so.0
    ├── libmd4c.so.0 -> libmd4c.so.0.4.8
    └── libmd4c.so.0.4.8

In using Zig, you get easy cross-compilation for free too :)

Hope this is useful, and thanks for the fantastic library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant