summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2179c08..d6b28c9 100644
--- 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)