cmark

My personal build of CMark ✏️

Commit
828eeaf8960a347777f34ed134c5211717f1d446
Parent
b7188e8c1bfe0e148c3d3e6d08a9004cdfb2264d
Author
Saleem Abdulrasool <compnerd@compnerd.org>
Date

build: improve man page installation

man pages are extremely useful, but are not generally available on Windows. This changes the install condition to check for the Windows cross-compile rather than the toolchain in use. It is possible to build for Windows using clang in the GNU driver.

Diffstat

2 files changed, 9 insertions, 8 deletions

Status File Name N° Changes Insertions Deletions
Modified CMakeLists.txt 6 5 1
Modified man/CMakeLists.txt 11 4 7
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -59,7 +59,11 @@ add_subdirectory(src)
 if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))
   add_subdirectory(api_test)
 endif()
-add_subdirectory(man)
+# TODO(compnerd) should this be enabled for MinGW, which sets CMAKE_SYSTEM_NAME
+# to Windows, but defines `MINGW`.
+if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  add_subdirectory(man)
+endif()
 if(CMARK_TESTS)
   enable_testing()
   add_subdirectory(test testdir)
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
@@ -1,7 +1,4 @@
-if (NOT MSVC)
-  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1
-    DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-
-  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark.3
-    DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
-endif(NOT MSVC)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1
+  DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark.3
+  DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)