[Interest] Adding extra target to pro file

Francisco Ares frares at gmail.com
Thu Jan 9 17:19:53 CET 2014


2014/1/9 Igor Mironchik <igor.mironchik at gmail.com>

>  Hi.
>
> I have the next .pro file
>
>
>  TEMPLATE = app
>
> TARGET = Picker
>
> DESTDIR = .
>
> CONFIG += windows
>
> QT += core gui widgets
>
>  ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
>
>  SOURCES += main.cpp
>
>  OTHER_FILES += android/AndroidManifest.xml
>
>  win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../../lib/ -lQtMWidgets
>
> else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../../lib/ -lQtMWidgets
>
> else:unix: LIBS += -L$$OUT_PWD/../../../lib/ -lQtMWidgets
>
>  INCLUDEPATH += $$PWD/../../../include
>
> DEPENDPATH += $$PWD/../../../include
>
>  win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../../lib/libQtMWidgets.a
>
> else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../../lib/libQtMWidgets.a
>
> else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../../lib/QtMWidgets.lib
>
> else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../../../lib/QtMWidgets.lib
>
> else:unix: PRE_TARGETDEPS += $$OUT_PWD/../../../lib/libQtMWidgets.a
>
> As you can see this app depends on QtMWidget library that is in separate directory. I have sources and
> .pro file for this library.
>
> And my question is how to tell in app's .pro file to build this lib?
>
>
> --
> Best Regards,
> Igor Mironchik.
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>

Hi,

I suppose the mentioned lib is just an example.  If so and AFAIK, you can't
do this in a single .pro file, but you can do this in a qt-creator project
- in fact, there will be two projects, each having its own .pro file, and
in qt-project projects manager there is a tab where you can set which
project depends on which other(s).

Hope this helps
Francisco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140109/b64beb4c/attachment.html>


More information about the Interest mailing list