Commit d1591319 authored by Mark Olesen's avatar Mark Olesen

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
parent c92ad9fc
......@@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # Run from this directory
get_pvplugin_api || echo "No ParaView plugin information found" 1>&2
# Cleanup libraries
wclean libso foamPv
wclean libso common
wclean libso blockMeshReader/library
wclean libso foamReader/library
......
......@@ -15,7 +15,7 @@ warnIncomplete()
if have_pvplugin_support
then
(
wmakeLibPv foamPv
wmakeLibPv common
wmakeLibPv blockMeshReader/library
wmakeLibPv foamReader/library
......
#-----------------------------------------------------------------------------
# OpenFOAM blockMeshDict reader plugin for ParaView GUI (pre-5.7)
set(CMAKE_BUILD_TYPE Release)
link_directories(
$ENV{FOAM_LIBBIN}
)
......@@ -10,7 +12,7 @@ include_directories(
${LIB_SRC}/OpenFOAM/lnInclude
${LIB_SRC}/OSspecific/${WM_OSTYPE}/lnInclude
${LIB_SRC}/meshing/blockMesh/lnInclude
${PROJECT_SOURCE_DIR}/../foamPv
${PROJECT_SOURCE_DIR}/../common
${PROJECT_SOURCE_DIR}/library
${PROJECT_SOURCE_DIR}/plugin
${PROJECT_SOURCE_DIR}/plugin/reader
......@@ -37,7 +39,7 @@ add_paraview_property_group_widget(IFACES0 IFACES0_SRCS
)
add_paraview_plugin(
PVblockMeshReader_SM "1.0"
PVblockMeshReader_SM "${foam_api}"
SERVER_MANAGER_XML
plugin/PVblockMeshReader_SM.xml
SERVER_MANAGER_SOURCES
......@@ -53,7 +55,7 @@ add_paraview_plugin(
target_link_libraries(
PVblockMeshReader_SM
LINK_PUBLIC
foamPv${foamPvLibQualifier}
vtkPVFoamCommon${foamPvLibQualifier}
vtkPVblockMesh${foamPvLibQualifier}
${OPENFOAM_LIBNAMES}
)
......
#-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0002 NEW) # Policy CMP0002 required for for cmake >= 3
cmake_policy(SET CMP0002 NEW) # For cmake >= 3
cmake_policy(SET CMP0057 NEW) # For cmake >= 3.10.2
# Fail if not building out-of-source
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
......@@ -32,16 +32,29 @@ else()
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}")
message("OpenFOAM libraries qualified with ${foamPvLibQualifier}")
#-----------------------------------------------------------------------------
message("================")
message("Using ParaView = $ENV{ParaView_DIR}")
message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
#-----------------------------------------------------------------------------
include(CMakeLists-OpenFOAM.txt)
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt)
else()
message("================")
include(${PARAVIEW_USE_FILE})
include(CMakeLists-Project.txt)
endif()
......
......@@ -6,11 +6,11 @@ EXE_INC = \
-I$(LIB_SRC)/mesh/blockMesh/lnInclude \
-I$(PARAVIEW_INC_DIR) \
-I$(PARAVIEW_INC_DIR)/vtkkwiml \
-I../../foamPv \
-I../../common \
-I../plugin/reader
LIB_LIBS = \
-lmeshTools \
-lblockMesh \
-L$(FOAM_LIBBIN) -lfoamPv-pv${PARAVIEW_API} \
-L$(FOAM_LIBBIN) -lvtkPVFoamCommon-pv${PARAVIEW_API} \
$(GLIBS)
foamPvCore.C
LIB = $(FOAM_LIBBIN)/libvtkPVFoamCommon-pv${PARAVIEW_API}
foamPvCore.C
LIB = $(FOAM_LIBBIN)/libfoamPv-pv${PARAVIEW_API}
#-----------------------------------------------------------------------------
# OpenFOAM reader plugin for ParaView GUI (pre-5.7)
set(CMAKE_BUILD_TYPE Release)
link_directories(
$ENV{FOAM_LIBBIN}
)
......@@ -13,7 +15,7 @@ include_directories(
${LIB_SRC}/conversion/lnInclude
${LIB_SRC}/finiteArea/lnInclude
${LIB_SRC}/finiteVolume/lnInclude
${PROJECT_SOURCE_DIR}/../foamPv
${PROJECT_SOURCE_DIR}/../common
${PROJECT_SOURCE_DIR}/library
${PROJECT_SOURCE_DIR}/plugin
${PROJECT_SOURCE_DIR}/plugin/reader
......@@ -43,7 +45,7 @@ add_paraview_property_group_widget(IFACES0 IFACES0_SRCS
)
add_paraview_plugin(
PVFoamReader_SM "1.0"
PVFoamReader_SM "${foam_api}"
SERVER_MANAGER_XML
plugin/PVFoamReader_SM.xml
SERVER_MANAGER_SOURCES
......@@ -56,11 +58,10 @@ add_paraview_plugin(
plugin/pqFoamReaderControls.cxx
)
target_link_libraries(
PVFoamReader_SM
LINK_PUBLIC
foamPv${foamPvLibQualifier}
vtkPVFoamCommon${foamPvLibQualifier}
vtkPVFoam${foamPvLibQualifier}
${OPENFOAM_LIBNAMES}
)
......
#-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0002 NEW) # Policy CMP0002 required for for cmake >= 3
cmake_policy(SET CMP0002 NEW) # For cmake >= 3
cmake_policy(SET CMP0057 NEW) # For cmake >= 3.10.2
# Fail if not building out-of-source
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
......@@ -32,16 +32,27 @@ else()
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}")
message("OpenFOAM libraries qualified with ${foamPvLibQualifier}")
#-----------------------------------------------------------------------------
message("================")
message("Using ParaView = $ENV{ParaView_DIR}")
message("OpenFOAM api = ${foam_api}, libs = ${foamPvLibQualifier}")
include(CMakeLists-OpenFOAM.txt)
if (${ParaView_VERSION} GREATER_EQUAL 5.7)
message("================")
include(CMakeLists-Project57.txt)
else()
message("================")
include(${PARAVIEW_USE_FILE})
include(CMakeLists-Project.txt)
endif()
......
......@@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(PARAVIEW_INC_DIR) \
-I$(PARAVIEW_INC_DIR)/vtkkwiml \
-I../../foamPv \
-I../../common \
-I../plugin/reader
LIB_LIBS = \
......@@ -21,5 +21,5 @@ LIB_LIBS = \
-ldynamicMesh \
-lgenericPatchFields \
-llagrangian \
-L$(FOAM_LIBBIN) -lfoamPv-pv${PARAVIEW_API} \
-L$(FOAM_LIBBIN) -lvtkPVFoamCommon-pv${PARAVIEW_API} \
$(GLIBS)
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