summaryrefslogtreecommitdiff
path: root/libcmark-gfm-extensions/libcmark-gfm-extensions
diff options
context:
space:
mode:
Diffstat (limited to 'libcmark-gfm-extensions/libcmark-gfm-extensions')
-rw-r--r--libcmark-gfm-extensions/libcmark-gfm-extensions/buildfile69
-rw-r--r--libcmark-gfm-extensions/libcmark-gfm-extensions/cmark-gfm-extensions_export.h48
l---------libcmark-gfm-extensions/libcmark-gfm-extensions/extensions1
3 files changed, 118 insertions, 0 deletions
diff --git a/libcmark-gfm-extensions/libcmark-gfm-extensions/buildfile b/libcmark-gfm-extensions/libcmark-gfm-extensions/buildfile
new file mode 100644
index 0000000..c0c7fb5
--- /dev/null
+++ b/libcmark-gfm-extensions/libcmark-gfm-extensions/buildfile
@@ -0,0 +1,69 @@
+# file : libcmark-gfm-extensions/buildfile
+# copyright : Copyright (c) 2018-2019 Code Synthesis Ltd
+# license : FreeBSD License; see accompanying COPYING file
+
+import int_libs = libcmark-gfm%lib{cmark-gfm}
+
+lib{cmark-gfm-extensions}: {h c}{**} $int_libs
+
+windows = ($c.target.class == 'windows')
+
+gcc = ($c.class == 'gcc')
+msvc = ($c.class == 'msvc')
+
+# Build options.
+#
+obja{*}: c.poptions += -DCMARK_GFM_EXTENSIONS_STATIC_BUILD
+objs{*}: c.poptions += -DCMARK_GFM_EXTENSIONS_SHARED_BUILD
+
+if! $windows
+ c.coptions += -fvisibility=hidden
+else
+ c.poptions += -DWIN32 -D_WINDOWS
+
+c.poptions =+ "-I$src_base" "-I$src_base/extensions"
+
+if $msvc
+{
+ # Disable warnings that pop up with /W3.
+ #
+ c.coptions += /wd4311
+}
+elif $gcc
+{
+ c.coptions += -pedantic
+
+ # Disable warnings that pop up with -Wextra. Upstream doesn't seem to care
+ # about these and it is not easy to disable specific warnings in a way that
+ # works across compilers/version (some -Wno-* options are only recognized in
+ # newer versions). There are still some warnings left that appear for
+ # certain platforms/compilers. We pass them through but disable treating
+ # them as errors.
+ #
+ c.coptions += -Wno-extra -Wno-error
+}
+
+# Export options.
+#
+lib{cmark-gfm-extensions}:
+{
+ cc.export.poptions = "-I$src_base" "-I$src_base/extensions"
+ cc.export.libs = $int_libs
+}
+
+liba{cmark-gfm-extensions}: cc.export.poptions += -DCMARK_GFM_EXTENSIONS_STATIC
+libs{cmark-gfm-extensions}: cc.export.poptions += -DCMARK_GFM_EXTENSIONS_SHARED
+
+# See bootstrap.build for details.
+#
+if $version.pre_release
+ lib{cmark-gfm-extensions}: bin.lib.version = @"-$version.project_id"
+else
+ lib{cmark-gfm-extensions}: bin.lib.version = @"-$abi_version"
+
+# Install the bare minimum of headers.
+#
+h{*}: install = false
+
+for h: extensions/cmark-gfm-core-extensions.h cmark-gfm-extensions_export.h
+ h{$h}@./$path.directory($h): install = include/
diff --git a/libcmark-gfm-extensions/libcmark-gfm-extensions/cmark-gfm-extensions_export.h b/libcmark-gfm-extensions/libcmark-gfm-extensions/cmark-gfm-extensions_export.h
new file mode 100644
index 0000000..db966d5
--- /dev/null
+++ b/libcmark-gfm-extensions/libcmark-gfm-extensions/cmark-gfm-extensions_export.h
@@ -0,0 +1,48 @@
+/* file : libcmark-gfm-extensions/cmark-gfm-extensions_export.h -*- C -*-
+ * copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
+ * license : FreeBSD License; see accompanying COPYING file
+ */
+
+#ifndef CMARK_GFM_EXTENSIONS_EXPORT_H
+#define CMARK_GFM_EXTENSIONS_EXPORT_H
+
+/*
+ * The upstream's version of this file is auto-generated by cmake. We implement
+ * it from scratch (see cmark-gfm_export.h for details).
+ */
+#if defined(CMARK_GFM_EXTENSIONS_STATIC) // Using static.
+# define CMARK_GFM_EXTENSIONS_EXPORT
+#elif defined(CMARK_GFM_EXTENSIONS_STATIC_BUILD) // Building static.
+# define CMARK_GFM_EXTENSIONS_EXPORT
+#elif defined(CMARK_GFM_EXTENSIONS_SHARED) // Using shared.
+# ifdef _WIN32
+# define CMARK_GFM_EXTENSIONS_EXPORT __declspec(dllimport)
+# else
+# define CMARK_GFM_EXTENSIONS_EXPORT
+# endif
+#elif defined(CMARK_GFM_EXTENSIONS_SHARED_BUILD) // Building shared.
+# ifdef _WIN32
+# define CMARK_GFM_EXTENSIONS_EXPORT __declspec(dllexport)
+# else
+# define CMARK_GFM_EXTENSIONS_EXPORT __attribute__((visibility("default")))
+# endif
+#else
+// If none of the above macros are defined, then we assume we are being used
+// by some third-party build system that cannot/doesn't signal the library
+// type. Note that this fallback works for both static and shared but in case
+// of shared will be sub-optimal compared to having dllimport.
+//
+# define CMARK_GFM_EXTENSIONS_EXPORT // Using static or shared.
+#endif
+
+/*
+ * Undefining these cmake-generated macros is not technically required, but
+ * let's keep them for the record.
+ */
+#undef CMARK_GFM_EXTENSIONS_NO_EXPORT
+#undef CMARK_GFM_EXTENSIONS_DEPRECATED
+#undef CMARK_GFM_EXTENSIONS_NO_DEPRECATED
+#undef CMARK_GFM_EXTENSIONS_DEPRECATED_EXPORT
+#undef CMARK_GFM_EXTENSIONS_DEPRECATED_NO_EXPORT
+
+#endif /* CMARK_GFM_EXTENSIONS_EXPORT_H */
diff --git a/libcmark-gfm-extensions/libcmark-gfm-extensions/extensions b/libcmark-gfm-extensions/libcmark-gfm-extensions/extensions
new file mode 120000
index 0000000..b42e4e2
--- /dev/null
+++ b/libcmark-gfm-extensions/libcmark-gfm-extensions/extensions
@@ -0,0 +1 @@
+../../upstream/extensions \ No newline at end of file