Commit 2768d9b8 authored by domibel's avatar domibel
Browse files

ENH: Version numbering for shared libraries

git-svn-id: http://svn.slicer.org/Slicer4/trunk@10267 3bd1e089-480b-0410-8dfb-8563597acbee
parent 4e823934
......@@ -58,6 +58,13 @@ target_link_libraries(SlicerBaseCLI
slicer3_get_persistent_property(Slicer3_Base_LIBRARIES tmp)
slicer3_set_persistent_property(Slicer3_Base_LIBRARIES ${tmp} SlicerBaseCLI)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(SlicerBaseCLI PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS SlicerBaseCLI
RUNTIME DESTINATION ${Slicer3_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer3_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
......
......@@ -177,6 +177,13 @@ target_link_libraries(${lib_name}
RemoteIO
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
slicer3_get_persistent_property(Slicer3_Base_LIBRARIES tmp)
slicer3_set_persistent_property(Slicer3_Base_LIBRARIES ${tmp} ${lib_name})
......
......@@ -118,6 +118,13 @@ target_link_libraries(${lib_name}
slicer3_get_persistent_property(Slicer3_Base_LIBRARIES tmp)
slicer3_set_persistent_property(Slicer3_Base_LIBRARIES ${tmp} ${lib_name})
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION ${Slicer3_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer3_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
......
......@@ -65,6 +65,17 @@ set(Slicer3_VERSION_FULL "${Slicer3_VERSION}.${Slicer3_VERSION_PATCH}")
#
option(BUILD_SHARED_LIBS "Build Slicer3 with shared libraries." ON)
#-----------------------------------------------------------------------------
# Append the library version information to the library target properties.
#
OPTION(Slicer3_WITH_LIBRARY_VERSION "Build with library version information" OFF)
IF(Slicer3_WITH_LIBRARY_VERSION)
SET(Slicer3_LIBRARY_PROPERTIES ${Slicer3_LIBRARY_PROPERTIES}
VERSION ${Slicer3_VERSION_FULL}
SOVERSION ${Slicer3_VERSION}
)
ENDIF(Slicer3_WITH_LIBRARY_VERSION)
#-----------------------------------------------------------------------------
# Slicer3 macros
#
......
......@@ -68,6 +68,13 @@ target_link_libraries(${lib_name}
vtkIOTCL
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -139,6 +139,13 @@ target_link_libraries(${lib_name}
${TRACKING_INTERFACE_LIB}
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -116,6 +116,13 @@ target_link_libraries(CommandIOPlugin
# Note CommandIO and CommandIOPlugin are installed in different locations
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS CommandIOPlugin
RUNTIME DESTINATION ${ITKCommandIO_INSTALL_ITKFACTORIES_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${ITKCommandIO_INSTALL_ITKFACTORIES_DIR} COMPONENT RuntimeLibraries
......
......@@ -116,6 +116,13 @@ endif(NOT WIN32 AND HAVE_BFD)
target_link_libraries(${lib_name} ${link_libs})
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -91,6 +91,13 @@ target_link_libraries(MGHIOPlugin
${lib_name}
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS MGHIOPlugin
RUNTIME DESTINATION ${MGHImageIO_INSTALL_ITKFACTORIES_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${MGHImageIO_INSTALL_ITKFACTORIES_DIR} COMPONENT RuntimeLibraries
......
......@@ -237,6 +237,13 @@ if(MRML_USE_Teem)
endif(MRML_USE_vtkTeem)
endif(MRML_USE_Teem)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -78,6 +78,13 @@ target_link_libraries(${lib_name}
vtkImaging
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -120,6 +120,13 @@ endif(NOT WIN32 AND HAVE_BFD)
target_link_libraries(${lib_name} ${link_libs})
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -76,6 +76,13 @@ target_link_libraries(${lib_name}
# vtkIOTCL
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -104,6 +104,13 @@ target_link_libraries(${lib_name}
MRML
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -111,6 +111,13 @@ target_link_libraries(${lib_name}
ITKDICOMParser
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -111,6 +111,13 @@ target_link_libraries(${lib_name}
${Teem_LIBRARIES}
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${lib_name}
RUNTIME DESTINATION bin COMPONENT RuntimeLibraries
LIBRARY DESTINATION lib/${PROJECT_NAME} COMPONENT RuntimeLibraries
......
......@@ -126,6 +126,13 @@ target_link_libraries(${lib_name}
Volumes
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
slicer3_install_modules(${lib_name})
# --------------------------------------------------------------------------
......
......@@ -110,6 +110,13 @@ if(Slicer3_USE_PYTHON)
endif(NOT WIN32)
endif(Slicer3_USE_PYTHON)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
slicer3_install_modules(${lib_name})
# --------------------------------------------------------------------------
......
......@@ -202,6 +202,13 @@ target_link_libraries(${lib_name}
Volumes
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${lib_name} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
slicer3_install_modules(${lib_name})
# --------------------------------------------------------------------------
......
......@@ -58,6 +58,13 @@ TARGET_LINK_LIBRARIES(${LIB_NAME}
ITKAlgorithms
)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES
${Slicer3_LIBRARY_PROPERTIES}
)
ENDIF(Slicer3_LIBRARY_PROPERTIES)
install(TARGETS ${LIB_NAME}
RUNTIME DESTINATION ${Slicer3_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${Slicer3_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
......
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