[Qt-creator] standalone plugins dependencies

Petr Vanek petr at yarpen.cz
Wed Jun 17 15:21:53 CEST 2015


On 06/17/2015 02:18 PM, Ziller Eike wrote:
>> On Jun 17, 2015, at 1:45 PM, Petr Vanek <petr at yarpen.cz> wrote:
>>
>> hi all,
>>
>> let's assume I have 2 standalone plugins with dependency. These plugins
>> are not merged into qt-creator tree. How can I specify dependencies
>> between these plugs, please?
>>
>>   - plug1, QTC_PLUGIN_DEPENDS += coreplugin texteditor projectexplorer
>>   - plug2, QTC_PLUGIN_DEPENDS += coreplugin texteditor projectexplorer plug1
>>
>> I tried to use QTC_PLUGIN_DIRS, for example, with no success.
> QTC_PLUGIN_DIRS was exactly created for this.
>
>> QTC_PLUGIN_DIRS += ../qore-plugin
> You have to set that somewhere before qtcreator(plugin).pri is included.
> (and you might want to use $$PWD/...... to avoid relative paths in qmake variables)
>
> So e.g. in your plugin’s .pro file
> QTC_PLUGIN_DIRS += $$PWD/../qore-plugin
> include($$QTCREATOR_SOURCES/src/qtcreatorplugin.pri)
>
> Or you can set QTC_PLUGIN_DIRS as an environment variable as well.
>
> Also note that this only works if plug1 (qorus-plugin ?) uses a plug1_dependencies.pri to specify its dependencies (i.e. with the  QTC_PLUGIN_NAME,  QTC_LIB_DEPENDS and  QTC_PLUGIN_DEPENDS inside).

d'oh, thanks.

There is one more condition. Plugin directory name must be the same as 
the resulting library name and mainly - the src code directory must have 
the same name.

So ./qore-plugin dir containing qore-plugin_dependencies.pri resulting 
in libqoreplugin.so won't work, while ./qoreplugin dir containing 
qoreplugin_dependencies.pri resulting in libqoreplugin.so does work.

thanks a lot,
petr




More information about the Qt-creator mailing list