Allow to have different SOVERSION for each CGAL libraries

In CGAL-4.14, I would like to have `libCGAL.so.13` (to keep
compatibility), but `libCGAL_Image.so.14` (to break compatibility).
This commit is contained in:
Laurent Rineau 2019-02-28 14:26:02 +01:00
parent 9f9ae00369
commit 8eee6f3e0c
2 changed files with 11 additions and 4 deletions

View File

@ -366,11 +366,14 @@ endif()
# CGAL-4.10 : 13.0.0 (Change the API/ABI in CGAL_ImageIO.) # CGAL-4.10 : 13.0.0 (Change the API/ABI in CGAL_ImageIO.)
# CGAL-4.11 : 13.0.1 (Nothing different in CGAL compiled libraries.) # CGAL-4.11 : 13.0.1 (Nothing different in CGAL compiled libraries.)
# CGAL-4.12 : 13.0.2 (Nothing different in CGAL compiled libraries.) # CGAL-4.12 : 13.0.2 (Nothing different in CGAL compiled libraries.)
# CGAL-4.14 : 14.0.0 (ABI broken in CGAL::Image_3.) # CGAL-4.14 : 14.0.0 , but only for CGAL_ImageIO (ABI broken in CGAL::Image_3.)
# CGAL-4.14 : 13.0.3 , for other libraries
# ¹) According to http://upstream-tracker.org/versions/cgal.html # ¹) According to http://upstream-tracker.org/versions/cgal.html
set( CGAL_SONAME_VERSION "14" ) set( CGAL_SONAME_VERSION "13" )
set( CGAL_SOVERSION "14.0.0" ) set( CGAL_SOVERSION "13.0.3" )
set( CGAL_ImageIO_SONAME_VERSION "14" )
set( CGAL_ImageIO_SOVERSION "14.0.0" )
message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" ) message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" )
message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" ) message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" )

View File

@ -50,7 +50,11 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
${rc_file} ${rc_file}
${ADDITIONAL_FILES}) ${ADDITIONAL_FILES})
# add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp # add_library (${LIBRARY_NAME} ${CGAL_LIBRARY_SOURCE_FILES} ${rc_file} ${ADDITIONAL_FILES}) # builing not creating temporary all_files.cpp
if(CGAL_SOVERSION AND CGAL_SONAME_VERSION) if(${LIBRARY_NAME}_SOVERSION AND ${LIBRARY_NAME}_SONAME_VERSION)
set_target_properties(${LIBRARY_NAME} PROPERTIES
VERSION "${${LIBRARY_NAME}_SOVERSION}"
SOVERSION "${${LIBRARY_NAME}_SONAME_VERSION}")
elseif(CGAL_SOVERSION AND CGAL_SONAME_VERSION)
set_target_properties(${LIBRARY_NAME} PROPERTIES set_target_properties(${LIBRARY_NAME} PROPERTIES
VERSION "${CGAL_SOVERSION}" VERSION "${CGAL_SOVERSION}"
SOVERSION "${CGAL_SONAME_VERSION}") SOVERSION "${CGAL_SONAME_VERSION}")