cmark

My personal build of CMark ✏️

Commit
fb68ad172015cce0e8fb6c5161297a3b79d35147
Parent
9a9b1760024caf43610aa838885f75c15ff19ccd
Author
John MacFarlane <jgm@berkeley.edu>
Date

Build static version of library in default build.

The static library will be named (lib)cmark_static. Closes #11.

Diffstat

1 file changed, 5 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified src/CMakeLists.txt 5 5 0
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -1,5 +1,6 @@
 cmake_minimum_required(VERSION 2.8)
 set(LIBRARY "libcmark")
+set(STATICLIBRARY "libcmark_static")
 set(HEADERS
   cmark.h
   parser.h
@@ -79,11 +80,15 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
 endif ()
 
 add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})
+add_library(${STATICLIBRARY} STATIC ${LIBRARY_SOURCES})
 # Include minor version in soname as long as major version is 0.
 set_target_properties(${LIBRARY} PROPERTIES
   OUTPUT_NAME "cmark"
   SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
   VERSION ${PROJECT_VERSION})
+set_target_properties(${STATICLIBRARY} PROPERTIES
+  OUTPUT_NAME "cmark_static"
+  VERSION ${PROJECT_VERSION})
 
 set_property(TARGET ${LIBRARY}
   APPEND PROPERTY MACOSX_RPATH true)