[Interest] Interest Digest, Vol 28, Issue 19

Igor Mironchik igor.mironchik at gmail.com
Thu Jan 9 15:42:56 CET 2014


> You may use TEMPLATE = subdirs feature of qmake to specify your lib as 
> a separate subproject.

I know about TEMPLATE = subdirs feature. But in my situation it wasn't 
possible. I've really needed to define extra target in app's .pro file.

I've found the solution:

QtMWidgets.commands += cd ../../../src && $(QMAKE) && $(MAKE)
QMAKE_EXTRA_TARGETS += QtMWidgets
PRE_TARGETDEPS += QtMWidgets

Thanks.

>
> 2014/1/9 <interest-request at qt-project.org 
> <mailto:interest-request at qt-project.org>>
>
>     Send Interest mailing list submissions to
>     interest at qt-project.org <mailto:interest at qt-project.org>
>
>     To subscribe or unsubscribe via the World Wide Web, visit
>     http://lists.qt-project.org/mailman/listinfo/interest
>     or, via email, send a message with subject or body 'help' to
>     interest-request at qt-project.org
>     <mailto:interest-request at qt-project.org>
>
>     You can reach the person managing the list at
>     interest-owner at qt-project.org <mailto:interest-owner at qt-project.org>
>
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of Interest digest..."
>
>
>     Today's Topics:
>
>        1. Adding extra target to pro file (Igor Mironchik)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Thu, 09 Jan 2014 10:57:02 +0200
>     From: Igor Mironchik <igor.mironchik at gmail.com
>     <mailto:igor.mironchik at gmail.com>>
>     Subject: [Interest] Adding extra target to pro file
>     To: Qt Project <interest at qt-project.org
>     <mailto:interest at qt-project.org>>
>     Message-ID: <52CE645E.1080103 at gmail.com
>     <mailto:52CE645E.1080103 at gmail.com>>
>     Content-Type: text/plain; charset="utf-8"
>
>     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.
>
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     http://lists.qt-project.org/pipermail/interest/attachments/20140109/f3ac34b2/attachment-0001.html
>
>     ------------------------------
>
>     _______________________________________________
>     Interest mailing list
>     Interest at qt-project.org <mailto:Interest at qt-project.org>
>     http://lists.qt-project.org/mailman/listinfo/interest
>
>
>     End of Interest Digest, Vol 28, Issue 19
>     ****************************************
>
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 
Best Regards,
Igor Mironchik.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140109/78d90609/attachment.html>


More information about the Interest mailing list