COMP: adjust common paraview library name to vtkPVFoamCommon

- similar prefixing as the dependent readers, making it easier to
  identify

- add FOAM_API information as server module version
This commit is contained in:
Mark Olesen
2019-11-11 11:21:45 +01:00
committed by Andrew Heather
parent 8495e8e92c
commit 713595f0c0
14 changed files with 41 additions and 18 deletions

View File

@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
get_pvplugin_api || echo "No ParaView plugin information found" 1>&2 get_pvplugin_api || echo "No ParaView plugin information found" 1>&2
# Cleanup libraries # Cleanup libraries
wclean libso foamPv wclean libso common
wclean libso blockMeshReader/library wclean libso blockMeshReader/library
wclean libso foamReader/library wclean libso foamReader/library

View File

@ -15,7 +15,7 @@ warnIncomplete()
if have_pvplugin_support if have_pvplugin_support
then then
( (
wmakeLibPv foamPv wmakeLibPv common
wmakeLibPv blockMeshReader/library wmakeLibPv blockMeshReader/library
wmakeLibPv foamReader/library wmakeLibPv foamReader/library

View File

@ -10,7 +10,7 @@ include_directories(
${LIB_SRC}/OpenFOAM/lnInclude ${LIB_SRC}/OpenFOAM/lnInclude
${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude ${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude
${LIB_SRC}/meshing/blockMesh/lnInclude ${LIB_SRC}/meshing/blockMesh/lnInclude
${PROJECT_SOURCE_DIR}/../foamPv ${PROJECT_SOURCE_DIR}/../common
${PROJECT_SOURCE_DIR}/library ${PROJECT_SOURCE_DIR}/library
${PROJECT_SOURCE_DIR}/plugin ${PROJECT_SOURCE_DIR}/plugin
${PROJECT_SOURCE_DIR}/plugin/reader ${PROJECT_SOURCE_DIR}/plugin/reader
@ -37,7 +37,7 @@ add_paraview_property_group_widget(IFACES0 IFACES0_SRCS
) )
add_paraview_plugin( add_paraview_plugin(
PVblockMeshReader_SM "1.0" PVblockMeshReader_SM "${foam_api}"
SERVER_MANAGER_XML SERVER_MANAGER_XML
plugin/PVblockMeshReader_SM.xml plugin/PVblockMeshReader_SM.xml
SERVER_MANAGER_SOURCES SERVER_MANAGER_SOURCES
@ -53,7 +53,7 @@ add_paraview_plugin(
target_link_libraries( target_link_libraries(
PVblockMeshReader_SM PVblockMeshReader_SM
LINK_PUBLIC LINK_PUBLIC
foamPv${foamPvLibQualifier} vtkPVFoamCommon${foamPvLibQualifier}
vtkPVblockMesh${foamPvLibQualifier} vtkPVblockMesh${foamPvLibQualifier}
${OPENFOAM_LIBNAMES} ${OPENFOAM_LIBNAMES}
) )

View File

@ -32,16 +32,29 @@ else()
endif() endif()
endif() endif()
# Pass through the OpenFOAM API value to the reader
set(foam_api "$ENV{FOAM_API}")
if (NOT "${foam_api}")
set(foam_api "2.0")
endif()
set(foamPvLibQualifier "-pv${pv_api}") set(foamPvLibQualifier "-pv${pv_api}")
message("OpenFOAM libraries qualified with ${foamPvLibQualifier}")
#-----------------------------------------------------------------------------
message("================")
message("Using ParaView = $ENV{ParaView_DIR}")
message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
include(CMakeLists-OpenFOAM.txt) include(CMakeLists-OpenFOAM.txt)
if (${ParaView_VERSION} GREATER_EQUAL 5.7) if (${ParaView_VERSION} GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt) include(CMakeLists-Project57.txt)
else() else()
message("================")
include(${PARAVIEW_USE_FILE}) include(${PARAVIEW_USE_FILE})
include(CMakeLists-Project.txt) include(CMakeLists-Project.txt)
endif() endif()

View File

@ -6,11 +6,11 @@ EXE_INC = \
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \ -I$(LIB_SRC)/mesh/blockMesh/lnInclude \
-I$(PARAVIEW_INC_DIR) \ -I$(PARAVIEW_INC_DIR) \
-I$(PARAVIEW_INC_DIR)/vtkkwiml \ -I$(PARAVIEW_INC_DIR)/vtkkwiml \
-I../../foamPv \ -I../../common \
-I../plugin/reader -I../plugin/reader
LIB_LIBS = \ LIB_LIBS = \
-lmeshTools \ -lmeshTools \
-lblockMesh \ -lblockMesh \
-L$(FOAM_LIBBIN) -lfoamPv-pv${PARAVIEW_API} \ -L$(FOAM_LIBBIN) -lvtkPVFoamCommon-pv${PARAVIEW_API} \
$(GLIBS) $(GLIBS)

View File

@ -0,0 +1,3 @@
foamPvCore.C
LIB = $(FOAM_LIBBIN)/libvtkPVFoamCommon-pv${PARAVIEW_API}

View File

@ -1,3 +0,0 @@
foamPvCore.C
LIB = $(FOAM_LIBBIN)/libfoamPv-pv${PARAVIEW_API}

View File

@ -13,7 +13,7 @@ include_directories(
${LIB_SRC}/conversion/lnInclude ${LIB_SRC}/conversion/lnInclude
${LIB_SRC}/finiteArea/lnInclude ${LIB_SRC}/finiteArea/lnInclude
${LIB_SRC}/finiteVolume/lnInclude ${LIB_SRC}/finiteVolume/lnInclude
${PROJECT_SOURCE_DIR}/../foamPv ${PROJECT_SOURCE_DIR}/../common
${PROJECT_SOURCE_DIR}/library ${PROJECT_SOURCE_DIR}/library
${PROJECT_SOURCE_DIR}/plugin ${PROJECT_SOURCE_DIR}/plugin
${PROJECT_SOURCE_DIR}/plugin/reader ${PROJECT_SOURCE_DIR}/plugin/reader
@ -43,7 +43,7 @@ add_paraview_property_group_widget(IFACES0 IFACES0_SRCS
) )
add_paraview_plugin( add_paraview_plugin(
PVFoamReader_SM "1.0" PVFoamReader_SM "${foam_api}"
SERVER_MANAGER_XML SERVER_MANAGER_XML
plugin/PVFoamReader_SM.xml plugin/PVFoamReader_SM.xml
SERVER_MANAGER_SOURCES SERVER_MANAGER_SOURCES
@ -56,11 +56,10 @@ add_paraview_plugin(
plugin/pqFoamReaderControls.cxx plugin/pqFoamReaderControls.cxx
) )
target_link_libraries( target_link_libraries(
PVFoamReader_SM PVFoamReader_SM
LINK_PUBLIC LINK_PUBLIC
foamPv${foamPvLibQualifier} vtkPVFoamCommon${foamPvLibQualifier}
vtkPVFoam${foamPvLibQualifier} vtkPVFoam${foamPvLibQualifier}
${OPENFOAM_LIBNAMES} ${OPENFOAM_LIBNAMES}
) )

View File

@ -32,16 +32,27 @@ else()
endif() endif()
endif() endif()
# Pass through the OpenFOAM API value to the reader
set(foam_api "$ENV{FOAM_API}")
if (NOT "${foam_api}")
set(foam_api "2.0")
endif()
set(foamPvLibQualifier "-pv${pv_api}") set(foamPvLibQualifier "-pv${pv_api}")
message("OpenFOAM libraries qualified with ${foamPvLibQualifier}")
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
message("================")
message("Using ParaView = $ENV{ParaView_DIR}")
message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
include(CMakeLists-OpenFOAM.txt) include(CMakeLists-OpenFOAM.txt)
if (${ParaView_VERSION} GREATER_EQUAL 5.7) if (${ParaView_VERSION} GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt) include(CMakeLists-Project57.txt)
else() else()
message("================")
include(${PARAVIEW_USE_FILE}) include(${PARAVIEW_USE_FILE})
include(CMakeLists-Project.txt) include(CMakeLists-Project.txt)
endif() endif()

View File

@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(PARAVIEW_INC_DIR) \ -I$(PARAVIEW_INC_DIR) \
-I$(PARAVIEW_INC_DIR)/vtkkwiml \ -I$(PARAVIEW_INC_DIR)/vtkkwiml \
-I../../foamPv \ -I../../common \
-I../plugin/reader -I../plugin/reader
LIB_LIBS = \ LIB_LIBS = \
@ -21,5 +21,5 @@ LIB_LIBS = \
-ldynamicMesh \ -ldynamicMesh \
-lgenericPatchFields \ -lgenericPatchFields \
-llagrangian \ -llagrangian \
-L$(FOAM_LIBBIN) -lfoamPv-pv${PARAVIEW_API} \ -L$(FOAM_LIBBIN) -lvtkPVFoamCommon-pv${PARAVIEW_API} \
$(GLIBS) $(GLIBS)