From 8eee6f3e0c337bffd9967ac5f84a54d32e3cfdf7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Feb 2019 14:26:02 +0100 Subject: [PATCH] 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). --- Installation/CMakeLists.txt | 9 ++++++--- Installation/src/CMakeLists.txt | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index f40f327b608..0a1e33d64ab 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -366,11 +366,14 @@ endif() # 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.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 -set( CGAL_SONAME_VERSION "14" ) -set( CGAL_SOVERSION "14.0.0" ) +set( CGAL_SONAME_VERSION "13" ) +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_SOVERSION =${CGAL_SOVERSION}" ) diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt index caf995799b3..09db484fd6e 100644 --- a/Installation/src/CMakeLists.txt +++ b/Installation/src/CMakeLists.txt @@ -50,7 +50,11 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) ${rc_file} ${ADDITIONAL_FILES}) # 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 VERSION "${CGAL_SOVERSION}" SOVERSION "${CGAL_SONAME_VERSION}")