summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNathan Osman <admin@quickmediasolutions.com>2013-03-06 17:51:38 -0800
committerNathan Osman <admin@quickmediasolutions.com>2013-03-06 17:51:38 -0800
commite7da9acdcddd163d4a1e42f51a5f794e168bfd44 (patch)
treed376bd47bfef00fee2ac953f8c98126bc240a24f /CMakeLists.txt
parent9952f24e6cc71ef5ecd13831f783e308aae97c36 (diff)
downloadlibgit2-e7da9acdcddd163d4a1e42f51a5f794e168bfd44.tar.gz
Added build option SONAME to control whether VERSION and SOVERSION were set for the git2 target, as some platforms require that this NOT be set.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a0043f95..2aab1cb6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Build options
#
+OPTION( SONAME "Set the (SO)VERSION of the target" ON )
OPTION( BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON )
OPTION( THREADSAFE "Build libgit2 as threadsafe" OFF )
OPTION( BUILD_CLAR "Build Tests using the Clar suite" ON )
@@ -258,8 +259,10 @@ TARGET_OS_LIBRARIES(git2)
MSVC_SPLIT_SOURCES(git2)
-SET_TARGET_PROPERTIES(git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING})
-SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR})
+IF (SONAME)
+ SET_TARGET_PROPERTIES(git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING})
+ SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR})
+ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc @ONLY)
IF (MSVC_IDE)