From: Debian Science Maintainers Date: Thu, 21 Oct 2021 16:29:30 +0000 (+0100) Subject: soname X-Git-Tag: archive/raspbian/2.8.0-3+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f0acaf38a01464705c62d4a0dcd3d9bc2c1e5609;p=dune-common.git soname Gbp-Pq: Name soname.patch --- diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake index dffaee2..5c07b05 100644 --- a/cmake/modules/DuneMacros.cmake +++ b/cmake/modules/DuneMacros.cmake @@ -985,9 +985,14 @@ endfunction(dune_expand_object_libraries) # More docu can be found at the top of this file. macro(dune_add_library basename) include(CMakeParseArguments) - cmake_parse_arguments(DUNE_LIB "APPEND;NO_EXPORT;OBJECT" "COMPILE_FLAGS" + cmake_parse_arguments(DUNE_LIB "APPEND;NO_EXPORT;OBJECT" "COMPILE_FLAGS;SOVERSION" "ADD_LIBS;SOURCES" ${ARGN}) list(APPEND DUNE_LIB_SOURCES ${DUNE_LIB_UNPARSED_ARGUMENTS}) + if(NOT DUNE_LIB_SOVERSION) + # If no explicit version is given, we assume the ABI is not stable and + # changes with every release. + set(DUNE_LIB_SOVERSION ${ProjectVersion}) + endif() if(DUNE_LIB_OBJECT) if(DUNE_LIB_${basename}_SOURCES) message(FATAL_ERROR "There is already a library with the name ${basename}, " @@ -1029,6 +1034,7 @@ macro(dune_add_library basename) endif() # Build library in ${PROJECT_BINARY_DIR}/lib set_target_properties(${basename} PROPERTIES + SOVERSION ${DUNE_LIB_SOVERSION} LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib" ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")