Commit 529117ee authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot

Merge topic 'update-for-cmake-module'

a376d370 Merge branch 'upstream-visit' into HEAD
2117bdf3 visit 2019-02-18 (9282745b)
a6d94076 update: bump for install target fix
1da823c0 databases: always find silo and mili if enabled
84bb797a cmake: update to the new module system
952fbf03 cmake: update CMake macros for better API and behaviors
a77d61f1 Merge branch 'upstream-visit-databases'
6a98e801 visit-databases 2019-02-15 (d1980aea)
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !56
parents c7d8fefa a376d370
vtk_module_third_party(VisItLib
LIBRARIES VisItLib
NO_ADD_SUBDIRECTORY
)
if(VTK_USE_SYSTEM_VISITLIB)
return()
endif()
add_subdirectory(VisItLib)
#any module that uses visitlib needs to know where its internal
#include directories are
list(APPEND VisItLib_INCLUDE_DIRS ${VISITBRIDGE_INCLUDE_DIRS})
vtk_module_export_info()
vtk_module_third_party_internal(
LICENSE_FILES "VisItLib/COPYRIGHT"
VERSION "2.13.0"
SUBDIRECTORY "VisItLib")
This diff is collapsed.
/*=========================================================================
Program: ParaView
Module: $RCSfile: @PLUGIN_NAME@Export.h.in,v $
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.2.
See License_v1.2.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#ifndef _@PLUGIN_NAME@Export_h
#define _@PLUGIN_NAME@Export_h
#if defined(WIN32) && defined(VISIT_BUILD_SHARED_LIBS)
# if defined(@LIBRARY_NAME@_EXPORTS)
# define @PLUGIN_NAME@_EXPORT __declspec(dllexport)
# else
# define @PLUGIN_NAME@_EXPORT __declspec(dllimport)
# endif
#else
# define @PLUGIN_NAME@_EXPORT
#endif
#endif
cmake_minimum_required(VERSION 2.6.3)
#cmake_minimum_required(VERSION 2.6.3)
FOREACH(policy CMP0012 CMP0013 CMP0014 CMP0017)
IF(POLICY ${policy})
CMAKE_POLICY(SET ${policy} NEW)
ENDIF()
ENDFOREACH()
#FOREACH(policy CMP0012 CMP0013 CMP0014 CMP0017)
# IF(POLICY ${policy})
# CMAKE_POLICY(SET ${policy} NEW)
# ENDIF()
#ENDFOREACH()
project(VisItBridgePlugin)
......@@ -29,62 +29,24 @@ add_subdirectory(common)
add_subdirectory(visit_vtk)
add_subdirectory(avt)
set(VISITBRIDGE_INCLUDE_DIRS
${vtkVisItAVTAlgorithms_BINARY_DIR}
${vtkVisItAVTAlgorithms_SOURCE_DIR}
${VISIT_COMMON_INCLUDES}
${VISIT_SOURCE_DIR}/include
${VISIT_SOURCE_DIR}/avt/Database/Database
${VISIT_SOURCE_DIR}/avt/Database/Ghost
${VISIT_SOURCE_DIR}/avt/Database/Formats
${VISIT_SOURCE_DIR}/avt/DBAtts/MetaData
${VISIT_SOURCE_DIR}/avt/DBAtts/SIL
${VISIT_SOURCE_DIR}/avt/Math
${VISIT_SOURCE_DIR}/avt/VisWindow/VisWindow
${VISIT_SOURCE_DIR}/avt/Pipeline/AbstractFilters
${VISIT_SOURCE_DIR}/avt/Pipeline/Data
${VISIT_SOURCE_DIR}/avt/Pipeline/Pipeline
${VISIT_SOURCE_DIR}/avt/Pipeline/Sinks
${VISIT_SOURCE_DIR}/avt/Pipeline/Sources
${VISIT_SOURCE_DIR}/visit_vtk/full
${VISIT_SOURCE_DIR}/visit_vtk/lightweight
${Boost_INCLUDE_DIR}
${VTK_INCLUDE_DIR}
CACHE INTERNAL ""
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/VisItBridgeUse.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/VisItBridgeUse.cmake @ONLY IMMEDIATE)
#######################################################################
# INSTALL
if (NOT VTK_INSTALL_NO_DEVELOPMENT)
set(BUILD_TREE ${ParaView_BINARY_DIR})
#install
set(cmakeDevFiles
${VISIT_CMAKE_DIR}/VisItCommon.cmake
${VISIT_CMAKE_DIR}/VisItExport.h.in
${VISIT_CMAKE_DIR}/VisItMT.h.in
${VISIT_CMAKE_DIR}/VisItMT.cxx.in
${VISIT_CMAKE_DIR}/VisItMTSM.xml.in
${VISIT_CMAKE_DIR}/VisItST.h.in
${VISIT_CMAKE_DIR}/VisItST.cxx.in
${VISIT_CMAKE_DIR}/VisItSTSM.xml.in)
install(
FILES ${cmakeDevFiles}
DESTINATION ${VTK_INSTALL_PACKAGE_DIR}/VisItLib
COMPONENT Development)
set(_temp_VISITBRIDGE_INCLUDE_DIRS ${VISITBRIDGE_INCLUDE_DIRS})
set(VISITBRIDGE_INCLUDE_DIRS "\${ParaView_INSTALL_PREFIX}/${PV_INSTALL_INCLUDE_DIR}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/VisItBridgeUse.cmake.in
"${BUILD_TREE}/CMake/tmp/VisItBridgeUse.cmake" @ONLY IMMEDIATE)
install(
FILES "${BUILD_TREE}/CMake/tmp/VisItBridgeUse.cmake"
DESTINATION ${VTK_INSTALL_PACKAGE_DIR}/VisItLib
COMPONENT Development)
set(VISITBRIDGE_INCLUDE_DIRS "${_temp_VISITBRIDGE_INCLUDE_DIRS}" CACHE INTERNAL "")
endif()
if (VISIT_PARALLEL)
set(visit_par_libs
avtdatabase_par
avtpipeline_par)
else ()
set(visit_par_libs
avtdatabase_ser
avtpipeline_ser)
endif ()
add_library(VisItLib INTERFACE)
target_link_libraries(VisItLib
INTERFACE
visitcommon
${visit_par_libs}
visit_vtk)
target_include_directories(VisItLib
INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
add_library(ParaView::VisItLib ALIAS VisItLib)
VISIT_INSTALL_TARGETS(VisItLib)
SET(HAVE_LIBSILO "@HAVE_LIBSILO@")
SET(HAVE_LIBMILI "@HAVE_LIBMILI@")
#Setup the use file for VisIt
SET(VISITBRIDGE_INCLUDE_DIRS "@VISITBRIDGE_INCLUDE_DIRS@")
......@@ -74,6 +74,7 @@ SIL/avtSILRestrictionTraverser.C
SIL/avtSILSet.C
)
if (FALSE)
INCLUDE_DIRECTORIES(
${VISIT_COMMON_INCLUDES}
${VISIT_SOURCE_DIR}/avt/DBAtts/MetaData
......@@ -82,11 +83,15 @@ ${VISIT_SOURCE_DIR}/avt/DBAtts/SIL
# Add link directories needed.
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY})
endif ()
#ADD_LIBRARY(avtdbatts ${METADATA_SOURCES} ${SIL_SOURCES})
VTK_ADD_LIBRARY(avtdbatts ${METADATA_SOURCES} ${SIL_SOURCES})
ADD_LIBRARY(avtdbatts ${METADATA_SOURCES} ${SIL_SOURCES})
#TARGET_LINK_LIBRARIES(avtdbatts visitcommon)
TARGET_LINK_LIBRARIES(avtdbatts LINK_PRIVATE visitcommon)
TARGET_LINK_LIBRARIES(avtdbatts PRIVATE visitcommon)
target_include_directories(avtdbatts
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/MetaData>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/SIL>")
VISIT_INSTALL_TARGETS(avtdbatts)
......@@ -89,6 +89,7 @@ ${FORMATS_SOURCES}
${GHOST_SOURCES}
)
if (FALSE)
INCLUDE_DIRECTORIES(
${VISIT_COMMON_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}/Database
......@@ -117,7 +118,6 @@ ${VTK_INCLUDE_DIRS}
# Add link directories
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${EAVL_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${MESA_LIBRARY_DIR} ${GLEW_LIBRARY_DIR})
if (FALSE)
# Unless we're doing a VISIT_DBIO_ONLY build then we need avtmir
IF(NOT VISIT_DBIO_ONLY)
SET(AVTMIR_SER avtmir_ser)
......@@ -128,10 +128,24 @@ endif ()
if (NOT VISIT_PARALLEL)
#********************************* SERIAL ************************************
#ADD_LIBRARY(avtdatabase_ser ${AVTDATABASE_SOURCES})
VTK_ADD_LIBRARY(avtdatabase_ser ${AVTDATABASE_SOURCES})
ADD_LIBRARY(avtdatabase_ser ${AVTDATABASE_SOURCES})
#TARGET_LINK_LIBRARIES(avtdatabase_ser visitcommon avtdbatts ${AVTMIR_SER} avtpipeline_ser visit_vtk tess2)
TARGET_LINK_LIBRARIES(avtdatabase_ser LINK_PUBLIC visitcommon avtdbatts ${AVTMIR_SER} avtpipeline_ser visit_vtk)
TARGET_LINK_LIBRARIES(avtdatabase_ser
PUBLIC
#visitcommon
#avtdbatts
#${AVTMIR_SER}
#avtpipeline_ser
#visit_vtk
VTK::CommonCore
PRIVATE
VTK::CommonDataModel
VTK::CommonExecutionModel)
target_include_directories(avtpipeline_ser
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Database>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Formats>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Ghost>")
VISIT_INSTALL_TARGETS(avtdatabase_ser)
else ()
......@@ -140,8 +154,14 @@ else ()
#IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(avtdatabase_par ${AVTDATABASE_SOURCES})
#TARGET_LINK_LIBRARIES(avtdatabase_par visitcommon avtdbatts ${AVTMIR_PAR} avtpipeline_par visit_vtk tess2)
TARGET_LINK_LIBRARIES(avtdatabase_par LINK_PUBLIC visitcommon avtdbatts ${AVTMIR_PAR} avtpipeline_par visit_vtk)
TARGET_LINK_LIBRARIES(avtdatabase_par PUBLIC visitcommon avtdbatts ${AVTMIR_PAR} avtpipeline_par visit_vtk)
VISIT_INSTALL_TARGETS(avtdatabase_par)
target_include_directories(avtpipeline_par
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../VisWindow/VisWindow>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Database>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Formats>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Ghost>")
#ENDIF(VISIT_PARALLEL)
endif ()
......@@ -50,6 +50,7 @@ avtPolynomial.C
avtVector.C
)
if (FALSE)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${VISIT_COMMON_INCLUDES}
......@@ -58,10 +59,13 @@ ${VTK_INCLUDE_DIRS}
# Add link directories
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${VTK_LIBRARY_DIRS})
endif ()
#ADD_LIBRARY(avtmath ${AVTMATH_SOURCES})
ADD_LIBRARY(avtmath ${AVTMATH_SOURCES})
#TARGET_LINK_LIBRARIES(avtmath visitcommon vtkCommonCore)
VTK_ADD_LIBRARY(avtmath ${AVTMATH_SOURCES})
TARGET_LINK_LIBRARIES(avtmath LINK_PRIVATE visitcommon vtkCommonCore)
TARGET_LINK_LIBRARIES(avtmath PRIVATE visitcommon VTK::CommonCore)
target_include_directories(avtmath
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
VISIT_INSTALL_TARGETS(avtmath)
......@@ -229,6 +229,7 @@ ${SINKS_SOURCES}
${SOURCES_SOURCES}
)
if (FALSE)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${VISIT_COMMON_INCLUDES}
......@@ -254,6 +255,7 @@ ${ZLIB_INCLUDE_DIR}
# Add link directories
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${EAVL_LIBRARY_DIR} ${VTK_LIBRARY_DIRS})
endif ()
# Unless we're doing a VISIT_DBIO_ONLY build then we need avtmath
IF(NOT VISIT_DBIO_ONLY)
......@@ -263,29 +265,38 @@ ENDIF(NOT VISIT_DBIO_ONLY)
if (NOT VISIT_PARALLEL)
#********************************* SERIAL ************************************
#ADD_LIBRARY(avtpipeline_ser ${ALL_SOURCES})
ADD_LIBRARY(avtpipeline_ser ${ALL_SOURCES})
#TARGET_LINK_LIBRARIES(avtpipeline_ser visitcommon ${AVTMATH} avtdbatts
# visit_vtk lightweight_visit_vtk vtkCommonCore
# vtkCommonDataModel vtkFiltersGeometry
# vtkRenderingOpenGL vtkRenderingFreeType
# vtkRenderingFreeTypeOpenGL vtkInteractionStyle
# ${ZLIB_LIB} ${EAVL_LIB} ${VTKM_LIB})
VTK_ADD_LIBRARY(avtpipeline_ser ${ALL_SOURCES})
target_link_libraries(avtpipeline_ser
LINK_PUBLIC
PUBLIC
visitcommon
avtmath
avtdbatts
LINK_PRIVATE
VTK::CommonCore
PRIVATE
lightweight_visit_vtk
visit_vtk
vtkFiltersCore
vtkInteractionStyle
vtkIOLegacy
vtkIOXML
vtkRendering${VTK_RENDERING_BACKEND}
vtkFiltersGeometry
VTK::CommonDataModel
VTK::CommonExecutionModel
VTK::CommonMath
VTK::CommonTransforms
VTK::FiltersCore
VTK::FiltersGeometry
VTK::IOLegacy
VTK::RenderingCore
${ZLIB_LIB})
target_include_directories(avtpipeline_ser
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AbstractFilters>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Data>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Pipeline>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Sinks>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Sources>")
if (FALSE)
IF(HAVE_LIB_R)
......@@ -305,21 +316,31 @@ else ()
#IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(avtpipeline_par ${ALL_SOURCES})
target_link_libraries(avtpipeline_par
LINK_PUBLIC
PUBLIC
visitcommon
avtmath
avtdbatts
LINK_PRIVATE
VTK::CommonCore
PRIVATE
lightweight_visit_vtk
visit_vtk
vtkFiltersCore
vtkInteractionStyle
vtkIOLegacy
vtkIOXML
vtkRendering${VTK_RENDERING_BACKEND}
vtkFiltersGeometry
VTK::CommonDataModel
VTK::CommonExecutionModel
VTK::CommonMath
VTK::CommonTransforms
VTK::FiltersCore
VTK::FiltersGeometry
VTK::IOLegacy
VTK::RenderingCore
${ZLIB_LIB}
)
target_include_directories(avtpipeline_par
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AbstractFilters>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Data>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Pipeline>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Sinks>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Sources>")
#TARGET_LINK_LIBRARIES(avtpipeline_par visitcommon ${AVTMATH} avtdbatts
# visit_vtk lightweight_visit_vtk vtkCommonCore
......
......@@ -340,12 +340,13 @@ IF(WIN32)
PROPERTIES LANGUAGE CXX)
ENDIF(WIN32)
if (FALSE)
INCLUDE_DIRECTORIES(
${VISIT_COMMON_INCLUDES}
)
endif ()
#ADD_LIBRARY(visitcommon
VTK_ADD_LIBRARY(visitcommon
ADD_LIBRARY(visitcommon
${COMM_SOURCES} ${COMM_WIN32_SOURCES}
${EXCEPTION_SOURCES}
${EXPRESSION_SOURCES}
......@@ -355,11 +356,18 @@ VTK_ADD_LIBRARY(visitcommon
${PROXYBASE_SOURCES}
${STATE_SOURCES}
${UTILITY_SOURCES} ${UTILITY_WIN32_SOURCES})
target_link_libraries(visitcommon
PUBLIC
VTK::CommonCore
${ZLIB_LIB})
target_include_directories(visitcommon
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
# Specify the libraries to link against on Windows
IF(WIN32)
#TARGET_LINK_LIBRARIES(visitcommon ws2_32 shlwapi userenv ${ZLIB_LIB})
TARGET_LINK_LIBRARIES(visitcommon LINK_PUBLIC ws2_32 shlwapi userenv ${ZLIB_LIB})
TARGET_LINK_LIBRARIES(visitcommon PUBLIC ws2_32 shlwapi userenv ${ZLIB_LIB})
#ELSE(WIN32)
ELSEIF (FALSE)
TARGET_LINK_LIBRARIES(visitcommon ${ZLIB_LIB} ${CMAKE_THREAD_LIBS} ${DL_LIB})
......
......@@ -107,6 +107,7 @@ vtkVolumeFromVolume.C
)
if (FALSE)
INCLUDE_DIRECTORIES(
${VISIT_BINARY_DIR}/include
${VISIT_SOURCE_DIR}/include
......@@ -119,34 +120,31 @@ ${VISIT_SOURCE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
${BOOST_INCLUDE_DIR}
)
endif ()
IF(HAVE_BOOST)
ADD_DEFINITIONS(-D__USE_ISOC99)
ENDIF(HAVE_BOOST)
# Add link directories needed to use our libraries and VTK.
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${VTK_LIBRARY_DIRS})
#ADD_LIBRARY(visit_vtk ${VISIT_VTK_SOURCES})
VTK_ADD_LIBRARY(visit_vtk ${VISIT_VTK_SOURCES})
ADD_LIBRARY(visit_vtk ${VISIT_VTK_SOURCES})
target_link_libraries(visit_vtk
LINK_PUBLIC
PUBLIC
visitcommon
lightweight_visit_vtk
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkIOImage
LINK_PRIVATE
vtkFiltersExtraction
vtkFiltersFlowPaths
vtkFiltersSources
vtkImagingHybrid
vtkInteractionStyle
vtkIOLegacy
vtkRendering${VTK_RENDERING_BACKEND}
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonExecutionModel
PRIVATE
VTK::CommonTransforms
VTK::FiltersCore
VTK::FiltersGeneral
VTK::IOLegacy
VTK::ImagingHybrid
)
target_include_directories(visit_vtk
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
if (FALSE)
IF(HAVE_LIB_R)
......
......@@ -70,6 +70,7 @@ vtkVisItPointLocator.C
vtkVisItUtility.C
)
if (FALSE)
INCLUDE_DIRECTORIES(
${VISIT_SOURCE_DIR}/visit_vtk/full
${VISIT_SOURCE_DIR}/visit_vtk/lightweight
......@@ -80,20 +81,24 @@ ${VTK_INCLUDE_DIRS}
# Add link directories needed to use our libraries and VTK.
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${VTK_LIBRARY_DIRS})
endif ()
#ADD_LIBRARY(lightweight_visit_vtk
VTK_ADD_LIBRARY(lightweight_visit_vtk
ADD_LIBRARY(lightweight_visit_vtk
${LIGHTWEIGHT_VISIT_VTK_SOURCES}
)
#TARGET_LINK_LIBRARIES(lightweight_visit_vtk visitcommon vtkCommonCore vtkFiltersCore vtkIOLegacy)
target_link_libraries(lightweight_visit_vtk
LINK_PUBLIC
PUBLIC
visitcommon
LINK_PRIVATE
vtkCommonCore
vtkFiltersGeneral
vtkIOXML
vtkIOLegacy)
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonExecutionModel
VTK::FiltersCore
PRIVATE
VTK::IOLegacy)
target_include_directories(lightweight_visit_vtk
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>")
VISIT_INSTALL_TARGETS(lightweight_visit_vtk)
vtk_module(VisItLib
EXCLUDE_FROM_WRAPPING
DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonExecutionModel
vtkCommonMisc
vtkFiltersFlowPaths
vtkIOImage
vtkIOLegacy
PRIVATE_DEPENDS
vtkCommonMath
vtkCommonTransforms
vtkFiltersCore
vtkFiltersExtraction
vtkFiltersGeneral
vtkFiltersGeometry
vtkFiltersSources
vtkImagingHybrid
vtkRenderingCore
vtkRenderingVolume${VTK_RENDERING_BACKEND}
vtkpng
vtkzlib
# old modules seem not used. Will remove them in the future.
vtkFiltersAMR
vtkIOGeometry
vtkParallelCore
)
NAME
ParaView::VisItLib
LIBRARY_NAME
vtkVisItLib
DEPENDS
VTK::CommonCore
VTK::CommonDataModel
VTK::CommonExecutionModel
VTK::FiltersCore
VTK::zlib
PRIVATE_DEPENDS
VTK::CommonMath
VTK::CommonTransforms
VTK::FiltersGeneral
VTK::FiltersGeometry
VTK::IOLegacy
VTK::ImagingHybrid
VTK::RenderingCore
THIRD_PARTY
#get same cmake config as visitlib itself does
include(${CMAKE_CURRENT_SOURCE_DIR}/../Library/VisItLib/CMake/VisItCommon.cmake)
include(${VISIT_BINARY_DIR}/VisItBridgeUse.cmake)
macro(VISIT_INCLUDE_READER_SOURCE name state)
option(VISIT_BUILD_READER_${name} "Build VisIt Reader ${name}" ${state})
......@@ -81,6 +80,12 @@ endif(NOT WIN32)
#add generic vtkreader interface parent classes
add_subdirectory(AvtAlgorithms)
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(_VisItReader_output_dir
"${CMAKE_CURRENT_BINARY_DIR}")
include(VisItReader)
#add the default readers to the library
foreach(db ${DEFAULT_BRIDGE_READERS})
add_subdirectory(readers/${db})
......@@ -88,14 +93,11 @@ endforeach(db)
add_definitions("-DRC_CPP_VISIT_BUILD")
#-----------------------------------------------------------------------------
visit_include_reader_source(Silo OFF)
if(VISIT_BUILD_READER_Silo)
if(NOT HAVE_LIBSILO)
#if we currently don't have silo setup make it required
find_package(SILO REQUIRED)
endif(NOT HAVE_LIBSILO)
#if we currently don't have silo setup make it required
find_package(SILO REQUIRED)
if(NOT SILO_FOUND)
message(FATAL_ERROR "Unable to locate Silo library.")
endif(NOT SILO_FOUND)
......@@ -118,26 +120,13 @@ visit_include_reader_source(Boxlib3D OFF)
#-----------------------------------------------------------------------------
visit_include_reader_source(Mili OFF)
if(VISIT_BUILD_READER_Mili)
if(NOT HAVE_LIBMILI)
#if we currently don't have silo setup make it required
find_package(Mili REQUIRED)
endif(NOT HAVE_LIBMILI)
#if we currently don't have mili setup make it required
find_package(Mili REQUIRED)
if(NOT Mili_FOUND)
message(FATAL_ERROR "Unable to locate Mili library.")
endif(NOT Mili_FOUND)
endif(VISIT_BUILD_READER_Mili)
#-----------------------------------------------------------------------------
#include all the db directories before
#the visit files
include_directories(BEFORE
${VISIT_DB_INC_DIRS}
)
include_directories(
${VISITBRIDGE_INCLUDE_DIRS}
)
if(HAVE_LIBSILO AND VISIT_BUILD_READER_Silo)
include_directories(${SILO_INCLUDE_DIR})
endif(HAVE_LIBSILO AND VISIT_BUILD_READER_Silo)
......@@ -150,47 +139,54 @@ if(HAVE_LIBMILI AND VISIT_BUILD_READER_Mili)
include_directories(${Mili_INCLUDE_DIR})
endif(HAVE_LIBMILI AND VISIT_BUILD_READER_Mili)
set(Module_SRCS
${VISIT_SERVER_SOURCES}
)
set_source_files_properties(
${VISIT_DB_SOURCES}
PROPERTIES
WRAP_EXCLUDE 1
WRAP_EXCLUDE_PYTHON 1
SKIP_HEADER_INSTALL 1)
set(vtkIOVisItBridge_INCLUDE_DIRS "${vtkIOVisItBridge_INCLUDE_DIRS};${CMAKE_CURRENT_SOURCE_DIR}/AvtAlgorithms")
vtk_module_library(vtkIOVisItBridge ${Module_SRCS} ${VISIT_DB_SOURCES})
set(sources
AvtAlgorithms/vtkAvtFileFormatAlgorithm.cxx
AvtAlgorithms/vtkAvtMTMDFileFormatAlgorithm.cxx
AvtAlgorithms/vtkAvtMTSDFileFormatAlgorithm.cxx
AvtAlgorithms/vtkAvtSTMDFileFormatAlgorithm.cxx
AvtAlgorithms/vtkAvtSTSDFileFormatAlgorithm.cxx)
set(headers
AvtAlgorithms/vtkAvtFileFormatAlgorithm.h
AvtAlgorithms/vtkAvtMTMDFileFormatAlgorithm.h
AvtAlgorithms/vtkAvtMTSDFileFormatAlgorithm.h
AvtAlgorithms/vtkAvtSTMDFileFormatAlgorithm.h
AvtAlgorithms/vtkAvtSTSDFileFormatAlgorithm.h)
set(private_headers
AvtAlgorithms/vtkFileCloseSemiProperty.h)
get_property(visit_server_sources GLOBAL PROPERTY _visit_server_sources)
get_property(visit_db_sources GLOBAL PROPERTY _visit_db_sources)
get_property(visit_db_headers GLOBAL PROPERTY _visit_db_headers)
get_property(visit_include_dirs GLOBAL PROPERTY _visit_db_include_dirs)
vtk_module_add_module(ParaView::IOVisItBridge
SOURCES ${visit_server_sources} ${visit_db_sources} ${sources}
HEADERS ${headers} ${visit_db_headers}
PRIVATE_HEADERS ${private_headers})
vtk_module_include(ParaView::IOVisItBridge
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/AvtAlgorithms>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
PRIVATE
${visit_include_dirs})
paraview_add_server_manager_xmls(
XMLS visit_readers.xml)
# if you want to add vtk-module dependencies, simply add those in module.cmake,
# rather than explicitly adding those by using target_link_libraries.
if(VISIT_PARALLEL)
target_link_libraries(vtkIOVisItBridge
LINK_PRIVATE
visitcommon avtdatabase_par avtpipeline_par
visit_vtk)
else(VISIT_PARALLEL)
target_link_libraries(vtkIOVisItBridge
LINK_PRIVATE
visitcommon avtdatabase_ser avtpipeline_ser
visit_vtk)
endif(VISIT_PARALLEL)
if(HAVE_LIBSILO AND VISIT_BUILD_READER_Silo)
target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${SILO_LIBRARIES})
vtk_module_link(ParaView::IOVisItBridge PRIVATE ${SILO_LIBRARIES})
endif(HAVE_LIBSILO AND VISIT_BUILD_READER_Silo)
if(Boxlib_FOUND AND VISIT_BUILD_READER_Boxlib3D)
target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${Boxlib_LIBRARIES})
target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${GFortran_LIBRARIES})
if(VISIT_PARALLEL)
target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${MPI_CXX_LIBRARIES} ${MPI_Fortran_LIBRARIES})
endif()
vtk_module_link(ParaView::IOVisItBridge PRIVATE ${Boxlib_LIBRARIES})
vtk_module_link(ParaView::IOVisItBridge PRIVATE ${GFortran_LIBRARIES})
endif(Boxlib_FOUND AND VISIT_BUILD_READER_Boxlib3D)
if(HAVE_LIBMILI AND VISIT_BUILD_READER_Mili)
target_link_libraries(vtkIOVisItBridge LINK_PRIVATE ${Mili_LIBRARIES})
vtk_module_link(ParaView::IOVisItBridge PRIVATE ${Mili_LIBRARIES})
endif(HAVE_LIBMILI AND VISIT_BUILD_READER_Mili)
/*=========================================================================
Program: ParaView
Module: @PLUGIN_NAME@.cxx
Module: @_add_visit_reader_plugin_name@.cxx
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
......@@ -29,59 +29,58 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.