[Interest] Two from one.

André Hartmann andre.hartmann at iseg-hv.de
Thu Feb 8 14:34:32 CET 2018


Hi all,

It *is* possible with QMake, if you accept to have two additional
pro files: lib.pro for the library and the app.pro for the program.

The main pro file then looks like this:

TEMPLATE = subdirs

SUBDIRS += \
	lib \
	app

lib.file = lib.pro
app.file = app.pro

The lib.file and app.file are needed if these pro files are *not* in 
subdirectories, what SUBDIRS expect otherwise.

Regards,
André

Am 08.02.2018 um 14:22 schrieb Ola Røer Thorsen:
> 2018-02-08 13:56 GMT+01:00 william.crocker at analog.com 
> <mailto:william.crocker at analog.com> <william.crocker at analog.com 
> <mailto:william.crocker at analog.com>>:
> 
>     I have an application.
>     I would like to rearchitect it were 90% is in a shared library.
>     I would use that lib to link a main application.
>     I would like to create a single .pro file that can be
>     used to create both the library and main app.
>     I do not want to create the lib and app in separate dirs
>     with separate .pro files.
> 
> 
> I don't think it's possible at all with qmake the way you describe it.
> 
> However it is easily done with Qbs. You can have a single file, and you 
> won't have to move any source files.
> http://doc-snapshots.qt.io/qbs-1.11/howtos.html (second section)
> 
> Cheers,
> Ola
> 
> 
> 
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 



More information about the Interest mailing list