Hi Eike,

Sorry for the late response and thanks very much for the tip. I had to
modify the .pro file a bit more to make it work. Pasted below is a
project file for a imaginary DoNothing plugin.

QTC_SOURCE = C:/Work/QtCreator/
QTC_BUILD  = C:/Work/QtCreator/build/

TEMPLATE        = lib
TARGET          = DoNothing
IDE_SOURCE_TREE = $$QTC_SOURCE
IDE_BUILD_TREE  = $$QTC_BUILD
PROVIDER        = VCL
DESTDIR         = $$QTC_BUILD/lib/qtcreator/plugins/VCL
LIBS           += -L$$QTC_BUILD/lib/qtcreator/plugins/Nokia

include($$QTC_SOURCE/src/qtcreatorplugin.pri)
include($$QTC_SOURCE/src/plugins/coreplugin/coreplugin.pri)

HEADERS         = DoNothingPlugin.h
SOURCES         = DoNothingPlugin.cpp
OTHER_FILES     = DoNothingPlugin.pluginspec

In addition to be able to compile the plugin from an out-of-qtc-source
directory; I was also able to ensure that the plugin was installed in
a custom (VCL) subdirectory within build/lib/plugins.

Thanks,
Prashanth

On Mon, Aug 24, 2009 at 2:14 PM, Eike Ziller <[email protected]> wrote:
> Hi,
>
> in your plugin's pro file, you need to set a variable IDE_BUILD_TREE
> to the location of the creator build directory before including src/
> qtcreatorplugin.pri. Your plugin library will then end up at the
> correct place in Qt Creator\s build directory.
>
> E.g. assuming
> ~/dev/qt-creator
> ~/dev/qt-creator-build
> ~/dev/myplugin/myplugin.pro
>
> in myplugin.pro you should set
> IDE_BUILD_TREE=$$PWD/../qt-creator-build
> include(../qt-creator/src/qtcreatorplugin.pri)
>
> To make that more flexible you should consider reading the directories
> from environment variables, though, e.g.
>
> IDE_BUILD_TREE=$$(QTC_BUILD)
> include($$(QTC_SOURCE)/src/qtcreatorplugin.pri)
>
> and then set the environment variables QTC_BUILD and QTC_SOURCE
> correspondingly before running qmake.
>
> ++ Eike
>
> On Aug 24, 2009, at 7:52 AM, ext Prashanth Udupa wrote:
>
>> Hi All,
>>
>> I am learning to write plugins for Qt Creator. I am now able to write
>> plugins and build them from within the source tree (meaning my plugin
>> code is in src/plugins directory and I modify src/plugins/plugins.pro
>> to build my plugin along with others).
>>
>> I was wondering if it is possible to have plugin (custom ones that I
>> write) sources located outside the Qt Creator source tree and build it
>> from there. I am trying to figure it out by trial and error, but it
>> would be of great help if someone can give me some hints.
>>
>> Thanks,
>> Prashanth
>> _______________________________________________
>> Qt-creator mailing list
>> [email protected]
>> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
> --
> Eike Ziller
> Software Engineer
> Nokia, Qt Development Frameworks
> Phone  +49 (0)30 6392 3255
> Fax    +49 (0)30 6392 3256
> E-mail [email protected]
>
>
>
>
>
> _______________________________________________
> Qt-creator mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>



-- 
Thanks and Warm Regards,
Prashanth N Udupa

[email protected]
http://www.prashanthudupa.com
http://prashanthudupa.livejournal.com/

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to