Commit 12ace036 authored by Robert Maynard's avatar Robert Maynard

Switched to creating a single library for all readers.

Converted to a single library so that it will be easier to create client server wrappings for ParaView.
parent f43cf465
......@@ -43,7 +43,7 @@ ${VISIT_SOURCE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
)
ADD_LIBRARY(vtkVisItAVTAlgorithms ${SOURCES})
TARGET_LINK_LIBRARIES(vtkVisItAVTAlgorithms visitcommon avtdatabase_ser avtpipeline_ser visit_vtk vtkPVServerManager)
TARGET_LINK_LIBRARIES(vtkVisItAVTAlgorithms visitcommon avtdatabase_ser avtpipeline_ser visit_vtk)
#Install
#-------------------------------------------------------------------------------------------------
......
......@@ -78,6 +78,7 @@ MACRO(VISIT_READER_INCLUDES)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${vtkVisItAVTAlgorithms_BINARY_DIR}
${vtkVisItAVTAlgorithms_SOURCE_DIR}
${VISIT_COMMON_INCLUDES}
......@@ -127,10 +128,7 @@ FUNCTION(ADD_VISIT_READER NAME VERSION)
if(NOT ARG_VISIT_INCLUDE_NAME)
set(ARG_VISIT_INCLUDE_NAME ${ARG_VISIT_READER_NAME})
endif()
MESSAGE(STATUS "Generating wrappings for ${PLUGIN_NAME}")
VISIT_READER_INCLUDES()
if(ARG_VISIT_READER_USES_OPTIONS)
#determine the name of the plugin info class by removing the
#avt from the start and the FileFormat from the back
......@@ -144,20 +142,32 @@ FUNCTION(ADD_VISIT_READER NAME VERSION)
string(SUBSTRING ${ARG_VISIT_READER_TYPE} 0 2 READER_WRAPPER_TYPE)
configure_file(
${VISIT_CMAKE_DIR}/VisItExport.h.in
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}Export.h @ONLY)
${VISIT_DATABASE_BINARY_DIR}/${PLUGIN_NAME}Export.h @ONLY)
configure_file(
${VISIT_CMAKE_DIR}/VisIt${READER_WRAPPER_TYPE}.h.in
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}.h @ONLY)
${VISIT_DATABASE_BINARY_DIR}/${PLUGIN_NAME}.h @ONLY)
configure_file(
${VISIT_CMAKE_DIR}/VisIt${READER_WRAPPER_TYPE}.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}.cxx @ONLY)
${VISIT_DATABASE_BINARY_DIR}/${PLUGIN_NAME}.cxx @ONLY)
set(reader_sources
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}.cxx
${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_NAME}.h
)
${VISIT_DATABASE_BINARY_DIR}/${PLUGIN_NAME}.cxx
${VISIT_DATABASE_BINARY_DIR}/${PLUGIN_NAME}.h
)
#fix up the arg_server_sources path for compilation
set(ABS_SERVER_SOURCES "")
foreach(SRC_FILENAME ${ARG_SERVER_SOURCES})
list(APPEND ABS_SERVER_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${SRC_FILENAME}")
endforeach()
set(VISIT_SERVER_SOURCES ${VISIT_SERVER_SOURCES} ${reader_sources}
CACHE INTERNAL "vtk classes to wrap for client server")
set(VISIT_DB_SOURCES ${VISIT_DB_SOURCES} ${ABS_SERVER_SOURCES}
CACHE INTERNAL "visit sources for readers")
set(VISIT_DB_INC_DIRS ${VISIT_DB_INC_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
CACHE INTERNAL "include directories")
add_library(${NAME} ${ARG_SERVER_SOURCES} ${reader_sources})
ENDFUNCTION(ADD_VISIT_READER)
#Used for readers that are plugins for paraview
......@@ -352,9 +362,9 @@ ADD_PARAVIEW_PLUGIN( ${NAME} ${VERSION} ${PV_ARGS} )
ENDFUNCTION(ADD_VISIT_INTERFACE_PLUGIN_READER)
FUNCTION(VISIT_INCLUDE_READER_SOURCE name)
MACRO(VISIT_INCLUDE_READER_SOURCE name)
option(VISIT_BUILD_PLUGIN_${name} "Build VisIt reader {name} plugin" ON)
if (VISIT_BUILD_PLUGIN_${name})
ADD_SUBDIRECTORY(${name})
endif()
ENDFUNCTION(VISIT_INCLUDE_READER_SOURCE name)
\ No newline at end of file
ENDMACRO(VISIT_INCLUDE_READER_SOURCE name)
\ No newline at end of file
#VISIT_INCLUDE_READER_SOURCE is located in Cmake/ViItCommon.cmake
PROJECT(vtkVisItDatabases)
#these are used by visit_include_reader
set(VISIT_DATABASE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(VISIT_SERVER_SOURCES CACHE INTERNAL "vtk classes to wrap for client server" FORCE)
set(VISIT_DB_SOURCES "" CACHE INTERNAL "visit sources for readers" FORCE)
set(VISIT_DB_INC_DIRS CACHE INTERNAL "include directories" FORCE)
VISIT_INCLUDE_READER_SOURCE(Fluent)
VISIT_INCLUDE_READER_SOURCE(Miranda)
VISIT_INCLUDE_READER_SOURCE(ProteinDataBank)
......@@ -18,5 +25,44 @@ endif(HAVE_LIBSILO)
if ( HAVE_LIBNETCDF )
#VISIT_INCLUDE_READER_SOURCE(NETCDF)
endif( HAVE_LIBNETCDF )
endif( HAVE_LIBNETCDF )
SET(KIT VisItDatabases)
SET(KIT_UPCASE "VISITDATABASES")
#include all the visit directories
VISIT_READER_INCLUDES()
include_directories(
${VISIT_DB_INC_DIRS}
)
SET(Kit_SRCS
${VISIT_SERVER_SOURCES}
)
SET_SOURCE_FILES_PROPERTIES(
${VISIT_DB_SOURCES}
WRAP_EXCLUDE
)
#setup the kit so we get client server bindings
SET(VTK_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
INCLUDE(${VTK_CMAKE_DIR}/vtkExportKit.cmake)
VTK_EXPORT_KIT("${KIT}" "${KIT_UPCASE}" "${Kit_SRCS}")
#build all the readers into a single library
add_library(vtk${KIT} ${Kit_SRCS} ${VISIT_DB_SOURCES})
target_link_libraries(vtk${KIT} vtkVisItAVTAlgorithms)
if(PARAVIEW_HDF5_LIBRARIES)
target_link_libraries(vtk${KIT} ${PARAVIEW_HDF5_LIBRARIES})
endif(PARAVIEW_HDF5_LIBRARIES)
if(HAVE_LIBNETCDF)
target_link_libraries(vtk${KIT} vtkNetCDF)
endif(HAVE_LIBNETCDF)
if(HAVE_LIBSILO)
target_link_libraries(vtk${KIT} ${SILO_LIBRARY})
endif(HAVE_LIBSILO)
\ No newline at end of file
PROJECT(VisItEnzoReader)
SET(SOURCES
avtEnzoFileFormat.h
......@@ -9,6 +8,4 @@ ADD_VISIT_READER(VisItEnzoReader "1.0"
VISIT_READER_TYPE "STMD"
VISIT_READER_NAME "avtEnzoFileFormat"
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisItEnzoReader ${PARAVIEW_HDF5_LIBRARIES} vtkVisItAVTAlgorithms)
\ No newline at end of file
)
\ No newline at end of file
PROJECT(VisItFluentReader)
SET(SOURCES
avtFluentFileFormat.h
......@@ -9,5 +8,4 @@ ADD_VISIT_READER(VisItFluentReader "1.0"
VISIT_READER_TYPE "STMD"
VISIT_READER_NAME "avtFluentFileFormat"
SERVER_SOURCES ${SOURCES}
)
target_link_libraries(VisItFluentReader vtkVisItAVTAlgorithms)
\ No newline at end of file
)
\ No newline at end of file
PROJECT(VisItMirandaReader)
SET(SOURCES
avtMirandaFileFormat.C
......@@ -18,5 +17,3 @@ ADD_VISIT_READER(VisItMiranda "1.0"
VISIT_READER_USES_OPTIONS ON
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisItMiranda vtkVisItAVTAlgorithms)
\ No newline at end of file
PROJECT(VisItPixieReader)
SET(SOURCES
avtPixieFileFormat.h
......@@ -10,5 +9,3 @@ ADD_VISIT_READER(VisItPixieReader "1.0"
VISIT_READER_NAME "avtPixieFileFormat"
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisItPixieReader ${PARAVIEW_HDF5_LIBRARIES} vtkVisItAVTAlgorithms)
\ No newline at end of file
PROJECT(VisItProteinDataBankReader)
SET(SOURCES
avtProteinDataBankFileFormat.C
......@@ -19,5 +18,3 @@ ADD_VISIT_READER(VisItProteinDataBankReader "1.0"
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisItProteinDataBankReader vtkVisItAVTAlgorithms)
PROJECT(VisItSAMRAIReader)
SET(SOURCES
avtSAMRAIFileFormat.C
......@@ -15,6 +14,4 @@ ADD_VISIT_READER(VisItSAMRAIReader "1.0"
VISIT_READER_TYPE "STMD"
VISIT_READER_NAME "avtSAMRAIFileFormat"
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisItSAMRAIReader ${PARAVIEW_HDF5_LIBRARIES} vtkVisItAVTAlgorithms)
)
\ No newline at end of file
PROJECT(VisItSilo)
SET(SOURCES
avtSiloWriter.C
......@@ -21,5 +20,3 @@ ADD_VISIT_READER(VisItSilo "1.0"
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisItSilo vtkVisItAVTAlgorithms ${SILO_LIBRARY})
PROJECT(VisITTetradReader)
SET(SOURCES
avtTetradFileFormat.h
......@@ -10,5 +9,3 @@ ADD_VISIT_READER(VisITetradReader "1.0"
VISIT_READER_NAME "avtTetradFileFormat"
SERVER_SOURCES ${SOURCES}
)
TARGET_LINK_LIBRARIES(VisITetradReader ${PARAVIEW_HDF5_LIBRARIES} vtkVisItAVTAlgorithms)
\ No newline at end of file
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