File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
1616
1717# Build options
1818#
19+ OPTION ( SONAME "Set the (SO)VERSION of the target" ON )
1920OPTION ( BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON )
2021OPTION ( THREADSAFE "Build libgit2 as threadsafe" OFF )
2122OPTION ( BUILD_CLAR "Build Tests using the Clar suite" ON )
@@ -264,8 +265,10 @@ TARGET_OS_LIBRARIES(git2)
264265
265266MSVC_SPLIT_SOURCES (git2 )
266267
267- SET_TARGET_PROPERTIES (git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING} )
268- SET_TARGET_PROPERTIES (git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR} )
268+ IF (SONAME)
269+ SET_TARGET_PROPERTIES (git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING} )
270+ SET_TARGET_PROPERTIES (git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR} )
271+ ENDIF ()
269272CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR } /libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR } /libgit2.pc @ONLY )
270273
271274IF (MSVC_IDE )
You can’t perform that action at this time.
0 commit comments