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 )
@@ -258,8 +259,10 @@ TARGET_OS_LIBRARIES(git2)
258259
259260MSVC_SPLIT_SOURCES (git2 )
260261
261- SET_TARGET_PROPERTIES (git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING} )
262- SET_TARGET_PROPERTIES (git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR} )
262+ IF (SONAME)
263+ SET_TARGET_PROPERTIES (git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING} )
264+ SET_TARGET_PROPERTIES (git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR} )
265+ ENDIF ()
263266CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR } /libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR } /libgit2.pc @ONLY )
264267
265268IF (MSVC_IDE )
You can’t perform that action at this time.
0 commit comments