VTK_WRAP_JAVA3(vtk${KIT}Java KitJava_SRCS "${Kit_SRCS};${Kit_JAVA_EXTRA_WRAP_SRCS}")
VTK_ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
# Force JavaClasses to build in the right order by adding a depenency.
ADD_DEPENDENCIES(vtk${KIT}JavaJavaClasses vtk${KIT}Java)
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${KIT}Java
    EXPORT ${VTK_INSTALL_EXPORT_NAME}
    RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
    LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
    ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ADD_DEPENDENCIES(vtk${KIT}Java vtk${KIT})
IF(KIT_JAVA_DEPS)
  ADD_DEPENDENCIES(vtk${KIT}Java ${KIT_JAVA_DEPS})
ENDIF(KIT_JAVA_DEPS)

