Since you are building your plugins using CMake most of the following settings are automatically set. However, this document gives some hints about properties, which can maybe be helpful in case of any problems.
For programming a plugin, you need at least the following things:
Please consider to have all libraries, which you need, installed in the same version with respect to the processor type (32bit or 64bit).
itom is written in C++ using the Qt-framework. Qt provides platform-independent modules and classes which extend the possibilities of native C++. For example, Qt gives the opportunity to build GUI-applications, have network and graphics support or to establish a platform-independent plugin system.
On the one hand, some functionalities of Qt can be used by the help of native Qt-applications, like the designer to build “what-you-see-is-what-you-get” user interfaces, the translator to create translations of the application..., on the other hand C++ is enlarged by Qt by writing specific pre-compiler commands in the code. In both cases, these features have to be translated into native C++-code during the pre-compiling process. Therefore the project files have to be adapted, such that the Qt-specific pre-steps will be triggered once the project’s compilation process is started. All this is done if you install the Qt-AddOn for Visual Studio (if developping with Visual Studio IDE).
Since the plugin, you will write, is based on Qt‘s plugin system, these steps also have to be added to the plugin’s pre-compiling steps. This can be realized by different ways:
The pre-processor-step contains the following steps:
Qt is shipped with a number of different libraries (lying in the folder $QTDIR$bin). You must link your application against the libraries, whose function you will need in your plugin. It is always necessary to link against the library QtCore and QtGui if your plugin contains any user interface functionality. Other importent libraries are QtOpenGL for OpenGL-support, QtSvg for Svg-support or QtXml, QtSql or QtNetwork. For each of these libraries you plugin must have an entry in the include-directories and the linker-commands.
The pre-processor-definitions must contain the following entries: * WIN32 or _WIN64 * QT_LARGEFILE_SUPPORT * QT_PLUGIN * QT_DLL * QDESIGNER_EXPORT_WIDGETS
and for every Qt-library you need (in capital letters) * QT_CORE_LIB * QT_GUI_LIB * ...
Add the following include-directories ($(ITOM_QTDIR) is the path to the Qt-source directory - having subfolders like include or bin):
and for every further Qt-library * $(ITOM_QTDIR)includeQtCore * $(ITOM_QTDIR)includeQtGui * ...
Additionally you should add the path to OpenCV’s include directory, if you are using or linking against the DataObject.
Add as linker directory:
Your plugin should at least link agains the following libraries:
DEBUG:
RELEASE:
Note
For more information about the deployment of plugins, including notes about the Qt-version compatibility, see link to Qt-documentation