Commit 53f58b4f authored by Brad King's avatar Brad King 💬
Browse files

ENH: If VTK_LIBRARY_PROPERTIES is set then the properties it lists will be...

ENH: If VTK_LIBRARY_PROPERTIES is set then the properties it lists will be added to VTK library targets with SET_TARGET_PROPERTIES.  This will be useful to enable shared library versioning.
parent f39d17e4
......@@ -5,6 +5,7 @@ VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
${VTK_BINARY_DIR} "")
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT})
# Allow the user to customize their build with some local options
#
......@@ -20,6 +21,7 @@ IF (VTK_WRAP_TCL)
"${Kit_SRCS}"
"${Kit_TCL_EXTRA_CMDS}")
ADD_LIBRARY(vtk${KIT}TCL ${KitTCL_SRCS} ${Kit_TCL_EXTRA_SRCS})
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}TCL)
TARGET_LINK_LIBRARIES (vtk${KIT}TCL vtk${KIT} ${KIT_TCL_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}TCL)
......@@ -47,6 +49,7 @@ IF (VTK_WRAP_PYTHON)
ADD_LIBRARY(vtk${KIT}Python MODULE ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}Python)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
......@@ -64,6 +67,7 @@ ENDIF (VTK_WRAP_PYTHON)
IF (VTK_WRAP_JAVA)
VTK_WRAP_JAVA3(vtk${KIT}Java KitJava_SRCS "${Kit_SRCS}")
ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}Java)
TARGET_LINK_LIBRARIES(vtk${KIT}Java vtk${KIT} ${KIT_JAVA_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Java)
......@@ -92,3 +96,11 @@ IF(LOCALUSERMACRODEFINED)
"${KitJava_SRCS}" "${Kit_JAVA_EXTRA_SRCS}"
"${KitPython_SRCS}" "${Kit_PYTHON_EXTRA_SRCS}")
ENDIF(LOCALUSERMACRODEFINED)
# Apply user-defined properties to the library targets.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(${KIT_LIBRARY_TARGETS} PROPERTIES
${VTK_LIBRARY_PROPERTIES}
)
ENDIF(VTK_LIBRARY_PROPERTIES)
......@@ -418,11 +418,18 @@ IF (VTK_WRAP_PYTHON)
vtkTkRenderWidgetPython.cxx
vtkTkImageViewerWidgetPython.cxx
)
ADD_LIBRARY(vtkRenderingPythonTkWidgets SHARED
${RenderingPythonTkWidgets_SRCS})
ADD_LIBRARY(vtkRenderingPythonTkWidgets SHARED
${RenderingPythonTkWidgets_SRCS})
TARGET_LINK_LIBRARIES (vtkRenderingPythonTkWidgets
vtk${KIT}
${VTK_TK_LIBRARIES})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkRenderingPythonTkWidgets PROPERTIES
${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkRenderingPythonTkWidgets)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -28,6 +28,11 @@ CONFIGURE_FILE(${DICOMParser_SOURCE_DIR}/DICOMCMakeConfig.h.in
ADD_LIBRARY(vtkDICOMParser DICOMFile.cxx DICOMParser.cxx DICOMAppHelper.cxx)
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkDICOMParser PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkDICOMParser)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -144,6 +144,12 @@ SET (VTKFTGL_LIBS "${VTKFTGL_LIBS};${VTK_FREETYPE_LIBRARIES}")
#
ADD_LIBRARY (vtkftgl ${FTGL_SRCS})
TARGET_LINK_LIBRARIES(vtkftgl ${VTKFTGL_LIBS})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkftgl PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS (${VTK_INSTALL_LIB_DIR} vtkftgl)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -496,6 +496,13 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE}
${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
# Apply user-defined target properties to the library.
IF(KWSYS_PROPERTIES_CXX)
SET_TARGET_PROPERTIES(${KWSYS_NAMESPACE} PROPERTIES
${KWSYS_PROPERTIES_CXX}
)
ENDIF(KWSYS_PROPERTIES_CXX)
# Create an install target for the library.
IF(KWSYS_LIBRARY_INSTALL_DIR)
INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE})
......@@ -506,6 +513,13 @@ ENDIF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
ADD_LIBRARY(${KWSYS_NAMESPACE}_c ${KWSYS_LIBRARY_TYPE} ${KWSYS_C_SRCS})
# Apply user-defined target properties to the library.
IF(KWSYS_PROPERTIES_C)
SET_TARGET_PROPERTIES(${KWSYS_NAMESPACE} PROPERTIES
${KWSYS_PROPERTIES_C}
)
ENDIF(KWSYS_PROPERTIES_C)
# Create an install target for the library.
IF(KWSYS_LIBRARY_INSTALL_DIR)
INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE}_c)
......
......@@ -51,6 +51,11 @@ ENDIF(APPLE)
ADD_LIBRARY(vtkexoIIc ${cbind_SRCS})
TARGET_LINK_LIBRARIES(vtkexoIIc vtkNetCDF)
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkexoIIc PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkexoIIc)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -24,6 +24,11 @@ CONFIGURE_FILE(${VTKEXPAT_SOURCE_DIR}/.NoDartCoverage
ADD_LIBRARY(vtkexpat ${expat_SRCS})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkexpat PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkexpat)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -106,6 +106,12 @@ ADD_LIBRARY (vtkfreetype ${FREETYPE_SRCS})
IF (APPLE)
TARGET_LINK_LIBRARIES (vtkfreetype "-framework AppKit")
ENDIF (APPLE)
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkfreetype PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS (${VTK_INSTALL_LIB_DIR} vtkfreetype)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -47,6 +47,11 @@ CONFIGURE_FILE(${VTKJPEG_SOURCE_DIR}/jpegDllConfig.h.in
ADD_LIBRARY(vtkjpeg ${systemdependent_SRCS} ${common_SRCS} ${compression_SRCS} ${decompression_SRCS})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkjpeg PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkjpeg)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......@@ -54,4 +59,3 @@ IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR}/vtkjpeg .h
jpegDllConfig jpeglib vtk_jpeg_mangle jconfig jmorecfg jerror)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
......@@ -249,6 +249,11 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ncconfig.h.in
ADD_LIBRARY(vtkNetCDF
${netcdf_SRCS})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkNetCDF PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkNetCDF)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -28,6 +28,11 @@ CONFIGURE_FILE(${VTKPNG_SOURCE_DIR}/pngDllConfig.h.in
ADD_LIBRARY(vtkpng ${PNG_SRCS})
TARGET_LINK_LIBRARIES(vtkpng ${VTK_ZLIB_LIBRARIES})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkpng PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkpng)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -55,6 +55,11 @@ CONFIGURE_FILE(${VTKTIFF_SOURCE_DIR}/tiffDllConfig.h.in
ADD_LIBRARY(vtktiff ${common_SRCS})
TARGET_LINK_LIBRARIES( vtktiff ${VTK_ZLIB_LIBRARIES} ${VTK_JPEG_LIBRARIES} )
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtktiff PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtktiff)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
......@@ -34,6 +34,11 @@ CONFIGURE_FILE(${VTKZLIB_SOURCE_DIR}/zlibDllConfig.h.in
ADD_LIBRARY(vtkzlib ${ZLIB_SRCS})
# Apply user-defined properties to the library target.
IF(VTK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(vtkzlib PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtkzlib)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
......
Supports Markdown
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