Commit ca30c581 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[ADD] - cmake now utilizes SOVERSION correctly.

parent 5ff203d0
......@@ -175,12 +175,16 @@ INCLUDE_DIRECTORIES( ${OW_VERSION_HEADER_DIRECTORY} )
SETUP_VERSION_HEADER( ${OW_VERSION_HEADER} )
# Set the OW version string. This can be used by others for setting target versions during compilation.
GET_VERSION_STRING( dummy OW_VERSION "0.0.0 " )
GET_VERSION_STRING( dummy OW_VERSION "1.0.0 " )
IF( NOT DEFINED OW_VERSION )
# CMake does not like unset variables for target properties.
SET( OW_VERSION "0.0.0" )
SET( OW_VERSION "1.0.0" )
ENDIF()
# We need a SOVERSION too. This somehow describes the API compatibility. We use the major number here.
SPLIT_VERSION_STRING( ${OW_VERSION} OW_VERSION_MAJOR OW_VERSION_MINOR OW_VERSION_PATCH )
SET( OW_SOVERSION ${OW_VERSION_MAJOR} )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# REQUIRED third party libs
......
......@@ -19,7 +19,10 @@ IF( CMAKE_HOST_SYSTEM MATCHES Windows )
ENDIF()
# Set the version of the library.
SET_TARGET_PROPERTIES( ${OWExtBioSigName} PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${OWExtBioSigName} PROPERTIES
VERSION ${OW_VERSION}
SOVERSION ${OW_SOVERSION}
)
# install target
INSTALL( TARGETS ${OWExtBioSigName}
......
......@@ -19,7 +19,10 @@ IF( CMAKE_HOST_SYSTEM MATCHES Windows )
ENDIF()
# Set the version of the library.
SET_TARGET_PROPERTIES( ${OWExtBioSigName} PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${OWExtBioSigName} PROPERTIES
VERSION ${OW_VERSION}
SOVERSION ${OW_SOVERSION}
)
# install target
INSTALL( TARGETS ${OWExtBioSigName}
......
......@@ -22,7 +22,10 @@ IF(MSVC_IDE)
ENDIF(MSVC_IDE)
# Set the version of the library.
SET_TARGET_PROPERTIES( ${OWExtEEPName} PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${OWExtEEPName} PROPERTIES
VERSION ${OW_VERSION}
SOVERSION ${OW_SOVERSION}
)
# install target
INSTALL( TARGETS ${OWExtEEPName}
......
......@@ -50,9 +50,15 @@ IF(UNIX)
ENDIF(UNIX)
# Set the version of the library.
SET_TARGET_PROPERTIES( ${NIFTI_ZNZLIB_NAME} PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${NIFTI_ZNZLIB_NAME} PROPERTIES
VERSION ${OW_VERSION}
SOVERSION ${OW_SOVERSION}
)
# Set the version of the library.
SET_TARGET_PROPERTIES( ${NIFTI_NIFTILIB_NAME} PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${NIFTI_NIFTILIB_NAME} PROPERTIES
VERSION ${OW_VERSION}
SOVERSION ${OW_SOVERSION}
)
# install target
INSTALL( TARGETS ${NIFTI_NIFTILIB_NAME} ${NIFTI_ZNZLIB_NAME}
......
......@@ -84,7 +84,10 @@ FUNCTION( SETUP_MODULE _MODULE_NAME _MODULE_SOURCE_DIR _MODULE_DEPENDENCIES _MOD
TARGET_LINK_LIBRARIES( ${MODULE_NAME} ${OWCoreName} ${Boost_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENSCENEGRAPH_LIBRARIES} ${_MODULE_DEPENDENCIES} )
# Set the version of the library.
SET_TARGET_PROPERTIES( ${MODULE_NAME} PROPERTIES VERSION ${OW_VERSION} )
SET_TARGET_PROPERTIES( ${MODULE_NAME} PROPERTIES
VERSION ${OW_VERSION}
SOVERSION ${OW_SOVERSION}
)
# Do not forget the install targets
# NOTE: do we really need to set all permissions explicitely?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment