From 9ead98df8ae2a64842dd157485b69756b5a32a2c Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Tue, 14 Nov 2017 14:42:06 +0100
Subject: Generate export header for static-only build

Fixes issue #247.
---
 src/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src')

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d5a1936..995a9df 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -115,6 +115,11 @@ if (CMARK_STATIC)
       VERSION ${PROJECT_VERSION})
   endif(MSVC)
 
+  if (NOT CMARK_SHARED)
+    generate_export_header(${STATICLIBRARY}
+      BASE_NAME ${PROJECT_NAME})
+  endif()
+
   list(APPEND CMARK_INSTALL ${STATICLIBRARY})
 endif()
 
-- 
cgit v1.2.3