summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-03-07 21:49:15 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-03-07 21:49:15 -0800
commitfb68ad172015cce0e8fb6c5161297a3b79d35147 (patch)
tree408610b39ba597efc933422eeab6dc7d277874a9
parent9a9b1760024caf43610aa838885f75c15ff19ccd (diff)
Build static version of library in default build.
The static library will be named (lib)cmark_static. Closes #11.
-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)