summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2015-01-23 21:34:55 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2015-01-23 21:34:55 +0100
commit8a5b76740102dad3d7f1be154af1910174c973f0 (patch)
tree8d7e92ec0504cc13b327d076de91bce916559ece
parent3ed64d7568437e81a0746554af273faeaf2037b4 (diff)
Add version information to shared library
-rw-r--r--src/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a76ad0a..033a9be 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -76,8 +76,11 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif ()
add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})
-set_target_properties(${LIBRARY}
- PROPERTIES OUTPUT_NAME "cmark")
+# 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_property(TARGET ${LIBRARY}
APPEND PROPERTY MACOSX_RPATH true)