[Qt-creator] How to depend on Qt-Creator target

Eike Ziller Eike.Ziller at qt.io
Wed May 31 12:14:13 CEST 2017


> On May 31, 2017, at 11:30 AM, Marcel Gotsch <gotschmarcel+qtcreator at gmail.com> wrote:
> 
> Hello,
> 
> I’m building a plugin for the Qt Creator and cannot figure out how to get qmake to depend on the Qt Creator target.
> I want that the Qt Creator target is automatically build before the plugin is build. The qtcreator.pri seems to be included
> by the qtcreatorplugin.pri, so the target should be available.

Either you mark that dependency solely in builds done from Qt Creator (Projects mode, “Dependencies” section for the plugin project),
or, the usual IDE agnostic way to do that with qmake is to create a separate subdirs project which has Qt Creator and the plugin as a subdir.

> Another question that comes up is how the plugin can be distributed to users. I have some people that would like to use
> the plugin, but currently they would have to build the plugin themselves. Also, are they required to use same Qt Creator
> source code version as their installed Qt Creator has?

If you (or someone else) wants to build the plugin for use in a binary install from the Qt Project of Qt Creator, you can use the qtcreator_dev.7zip that we provide on our download page (e.g. http://download.qt.io/official_releases/qtcreator/4.3/4.3.0/installer_source/windows_vs2015_64/) as the “IDE_SOURCE_TREE”, and the location of the binary install of Qt Creator as the “IDE_BUILD_TREE”.

If you do not want to use the _dev package, you/they need to use the exact same Qt Creator sources as the install, and at least on Windows it is required to build that too (to get the required .lib files).

In any case you should use the same Qt version, and a compatible C++ compiler version, as shown in the About Qt Creator dialog, and do a release build.

If you want to create distributable binaries of your plugin, you can additionally set IDE_OUTPUT_PATH to some directory, do a build, and zip the contents in that path up. It should then be possibly to unzip that into the installed Qt Creator.

Br, Eike

> Any help is really appreciated :)
> 
> Best,
> Marcel
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B



More information about the Qt-creator mailing list