[Paraview] Compile Error with Custom Plugin for ParaView CVS
Mike Jackson
imikejackson at gmail.com
Fri Feb 22 12:16:34 EST 2008
Hate to say it, but it was already in there.
Here is my CMakeLists.txt for my Client Plugin.
# create a plugin that implements an object panel for a source proxy
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(RoboMetClientPlugin)
FIND_PACKAGE(Qt4)
IF(QT4_FOUND)
INCLUDE(${QT_USE_FILE})
INCLUDE_DIRECTORIES(
${VTK_INCLUDE_DIR}
${PARAVIEW_INCLUDE_DIRS}
${ParaView_SOURCE_DIR}/VTK/GUISupport/Qt
${pqComponents_SOURCE_DIR}
${pqComponents_BINARY_DIR}
${pqCore_SOURCE_DIR}
${pqCore_BINARY_DIR}
${QtWidgets_SOURCE_DIR}
${QtWidgets_BINARY_DIR}
${QtChart_SOURCE_DIR}
${QtChart_BINARY_DIR}
${QtTesting_SOURCE_DIR}
${QtTesting_BINARY_DIR}
${QtPython_SOURCE_DIR}
${QtPython_BINARY_DIR}
${ParaView_SOURCE_DIR}/Utilities/VTKClientServer
${ParaView_BINARY_DIR}/Utilities/VTKClientServer
)
# Reduce the number of dirs that get included on moc command line
# since it causes issues on Windows 2000.
SET(MOC_INCLUDE_DIRS ${MOC_INCLUDE_DIRS} ${QT_QTDESIGNER_INCLUDE_DIR})
GET_DIRECTORY_PROPERTY(include_dirs_tmp INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "$
{MOC_INCLUDE_DIRS}")
QT4_WRAP_CPP(MOC_SRCS pqH5RoboMetReaderPanel.h)
SET(UI_RESOURCES
Resources/pqH5RoboMetReaderPanel.qrc
)
QT4_ADD_RESOURCES(RCS_SOURCES
${UI_RESOURCES}
)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "$
{include_dirs_tmp}")
SOURCE_GROUP("Resources" FILES
${UI_RESOURCES}
)
SOURCE_GROUP("Generated" FILES
${RCS_SOURCES}
)
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS CLASS_NAME
pqH5RoboMetReaderPanel
XML_NAME H5RoboMetReader XML_GROUP sources)
# create a plugin for this panel
ADD_PARAVIEW_PLUGIN(H5RoboMetReaderPanelPlugin "1.0"
GUI_INTERFACES ${IFACES}
SOURCES pqH5RoboMetReaderPanel.cpp ${MOC_SRCS} $
{RCS_SOURCES} ${IFACE_SRCS})
ENDIF(QT4_FOUND)
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Feb 22, 2008, at 11:47 AM, clinton at elemtech.com wrote:
>
> ${pqComponents_SOURCE_DIR} needs to be added as an include dir
> before you do
> your QT4_WRAP_CPP call.
>
> Clint
>
> On Friday 22 February 2008 9:38:31 am Mike Jackson wrote:
>> I though I would attempt to insert my Client plugin cmake code into
>> the paraview build so that I could build everything in one step. I
>> patterned my cmake code after the Prism plugin with a one major
>> difference. I call my Client cmake code from my
>> PVRoboMetParaViewImport.cmake file.
>>
>> The compile progresses ok until I get to the point where the moc
>> generated file tries to get compiled.:
>>
>> [ 99%] Generating moc_pqH5RoboMetReaderPanelImplementation.cxx
>> cd /Users/Shared/Kitware-CVS/ParaView3/Build/H5RoboMet && /Users/
>> Shared/OpenSource/Qt-4.3.3-UBFrwk/bin/moc -o /Users/Shared/Kitware-
>> CVS/ParaView3/Build/H5RoboMet/
>> moc_pqH5RoboMetReaderPanelImplementation.cxx /Users/Shared/Kitware-
>> CVS/ParaView3/Build/H5RoboMet/pqH5RoboMetReaderPanelImplementation.h
>> /Users/Shared/Kitware-CVS/ParaView3/Build/H5RoboMet/
>> pqH5RoboMetReaderPanelImplementation.h:45: Error: Undefined interface
>> make[2]: *** [H5RoboMet/moc_pqH5RoboMetReaderPanelImplementation.cxx]
>> Error 1
>> make[1]: *** [H5RoboMet/CMakeFiles/H5RoboMetReaderPanelPlugin.dir/
>> all] Error 2
>>
>> Line 45 of that header file is this:
>>
>> Q_INTERFACES(pqObjectPanelInterface)
>>
>> I am guessing that I am missing any include path somewhere but not
>> really sure where.
>>
>>
>> If I compile ParaView completely, then compile my plugin using its
>> own cmake then the code compiles just fine.
>>
>> Anyone have any ideas?
>>
>> --
>> Mike Jackson
>> imikejackson & gmail * com
>>
>>
More information about the ParaView
mailing list