From 72bd9fd6cde296f8af8b7f43afcedc3eefac9392 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Tue, 16 Aug 2016 08:46:39 +0100 Subject: [PATCH] ParaView: GUI resource files in plugins are no longer supported Patch contributed by Bruno Santos Resolves bug-report http://bugs.openfoam.org/view.php?id=2192 --- .../PVFoamReader/PVFoamReader/CMakeLists.txt | 13 +++++++----- .../PVblockMeshReader/CMakeLists.txt | 21 +++++++++++-------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt index fbaedcfb30a..747a5d64e98 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/CMakeLists.txt @@ -51,26 +51,29 @@ ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS XML_GROUP sources ) -IF("${PARAVIEW_VERSION_MINOR}" EQUAL 0) +IF("${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}" EQUAL 4.0) + + # Special build options, specifically for ParaView 4.0.* + # Because as of 4.1.0, GUI_RESOURCE_FILES is no longer used. ADD_PARAVIEW_PLUGIN( PVFoamReader_SM "1.0" SERVER_MANAGER_XML PVFoamReader_SM.xml SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx GUI_INTERFACES ${IFACES} GUI_SOURCES pqPVFoamReaderPanel.cxx - ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} + ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} GUI_RESOURCE_FILES PVFoamReader.xml ) -ELSE("${PARAVIEW_VERSION_MINOR}" EQUAL 0) +ELSE("${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}" EQUAL 4.0) ADD_PARAVIEW_PLUGIN( PVFoamReader_SM "1.0" SERVER_MANAGER_XML PVFoamReader_SM.xml SERVER_MANAGER_SOURCES vtkPVFoamReader.cxx GUI_INTERFACES ${IFACES} GUI_SOURCES pqPVFoamReaderPanel.cxx - ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} + ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} ) -ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0) +ENDIF("${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}" EQUAL 4.0) TARGET_LINK_LIBRARIES( PVFoamReader_SM diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt index 2b28dafd1ae..f078fc4e252 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/CMakeLists.txt @@ -50,26 +50,29 @@ ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS XML_GROUP sources ) -IF("${PARAVIEW_VERSION_MINOR}" EQUAL 0) - ADD_PARAVIEW_PLUGIN( - PVblockMeshReader_SM "1.0" +IF("${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}" EQUAL 4.0) + + # Special build options, specifically for ParaView 4.0.* + # Because as of 4.1.0, GUI_RESOURCE_FILES is no longer used. + ADD_PARAVIEW_PLUGIN( + PVblockMeshReader_SM "1.0" SERVER_MANAGER_XML PVblockMeshReader_SM.xml SERVER_MANAGER_SOURCES vtkPVblockMeshReader.cxx GUI_INTERFACES ${IFACES} GUI_SOURCES pqPVblockMeshReaderPanel.cxx - ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} + ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} GUI_RESOURCE_FILES PVblockMeshReader.xml ) -ELSE("${PARAVIEW_VERSION_MINOR}" EQUAL 0) - ADD_PARAVIEW_PLUGIN( - PVblockMeshReader_SM "1.0" +ELSE("${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}" EQUAL 4.0) + ADD_PARAVIEW_PLUGIN( + PVblockMeshReader_SM "1.0" SERVER_MANAGER_XML PVblockMeshReader_SM.xml SERVER_MANAGER_SOURCES vtkPVblockMeshReader.cxx GUI_INTERFACES ${IFACES} GUI_SOURCES pqPVblockMeshReaderPanel.cxx - ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} + ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} ) -ENDIF("${PARAVIEW_VERSION_MINOR}" EQUAL 0) +ENDIF("${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}" EQUAL 4.0) # Build the client-side plugin -- GitLab