add build option for md2html executable (#184) Fixes build error for iOS, you can set BUILD_MD2HTML_EXECUTABLE as OFF Signed-off-by: Dylan <2894220@gmail.com> Co-authored-by: Martin Mitáš <mity@morous.org>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2613063..be565d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,10 @@ set(MD_VERSION "${MD_VERSION_MAJOR}.${MD_VERSION_MINOR}.${MD_VERSION_RELEASE}")
set(PROJECT_VERSION "${MD_VERSION}")
set(PROJECT_URL "https://github.com/mity/md4c")
+
+option(BUILD_MD2HTML_EXECUTABLE "Whether to compile the md2html executable" ON)
+
+
if(WIN32)
# On Windows, given there is no standard lib install dir etc., we rather
# by default build static lib.
@@ -56,4 +60,6 @@ endif()
include(GNUInstallDirs)
add_subdirectory(src)
-add_subdirectory(md2html)
+if (BUILD_MD2HTML_EXECUTABLE)
+ add_subdirectory(md2html)
+endif ()