From fb68ad172015cce0e8fb6c5161297a3b79d35147 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 7 Mar 2015 21:49:15 -0800 Subject: Build static version of library in default build. The static library will be named (lib)cmark_static. Closes #11. --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) -- cgit v1.2.3