PVReaders: Fix for older versions of ParaView in which Qt major version is not defined

This commit is contained in:
Will Bainbridge
2024-06-11 09:25:32 +01:00
parent b986611242
commit bb43dbe270
4 changed files with 18 additions and 0 deletions

View File

@ -81,6 +81,11 @@ IF(${ParaView_VERSION} VERSION_LESS 5.5)
OpenFOAM
)
ELSE()
# Assume QT version 5 if it hasn't been defined
IF(NOT PARAVIEW_QT_MAJOR_VERSION)
set(PARAVIEW_QT_MAJOR_VERSION 5)
ENDIF()
# Paraview-5.5.x and higher needs QT libraries listed in the link command
# in order for the headers to be available
TARGET_LINK_LIBRARIES(

View File

@ -6,6 +6,10 @@ SET_TARGET_PROPERTIES(
LIBRARY_OUTPUT_DIRECTORY "$ENV{PV_PLUGIN_PATH}"
)
IF(NOT PARAVIEW_QT_MAJOR_VERSION)
set(PARAVIEW_QT_MAJOR_VERSION 5)
ENDIF()
TARGET_LINK_LIBRARIES(
PVFoamReader_VTK
LINK_PUBLIC

View File

@ -79,6 +79,11 @@ IF(${ParaView_VERSION} VERSION_LESS 5.5)
OpenFOAM
)
ELSE()
# Assume QT version 5 if it hasn't been defined
IF(NOT PARAVIEW_QT_MAJOR_VERSION)
set(PARAVIEW_QT_MAJOR_VERSION 5)
ENDIF()
# Paraview-5.5.x and higher needs QT libraries listed in the link command
# in order for the headers to be available
TARGET_LINK_LIBRARIES(

View File

@ -6,6 +6,10 @@ SET_TARGET_PROPERTIES(
LIBRARY_OUTPUT_DIRECTORY "$ENV{PV_PLUGIN_PATH}"
)
IF(NOT PARAVIEW_QT_MAJOR_VERSION)
set(PARAVIEW_QT_MAJOR_VERSION 5)
ENDIF()
TARGET_LINK_LIBRARIES(
PVblockMeshReader_VTK
LINK_PUBLIC