Closed ali1234 closed 6 years ago
Hi, ali1234,
Thanks for your remarks. I make theses projects like this because, for me, the most important was QtUPnP.
chupnp and aivctrl are only examples of use the library. The library is a standalone tool (except of course QT libraries). For Windows it is a dynamic link library. For Unix it is a static library because the shared libraries management is less simple. At home, I build once QtUPnP and I use it when I make changes on chupnp, aivtrl or other applications. The library is considered like an external library.
However, your solution is fine but the code of QTUPnP is systematically linked with the executable. Regards
It would be nice if there was a .pri file for including the upnp library into a project. I made a .pri here:
https://github.com/ali1234/qmlrss/blob/qtupnp/lib/upnp.pri
Rather than building a static library this links all the .o files directly into the project that includes the .pri. It also sets up the include path. The headers are set up to be found in a sub-directory:
(I kept the top level include directory because some of the includes have very generic names.)
I based this on how QSyncable and SortFilterProxyModel do it.
The benefit of doing this is you only have to add one line into the application.pro and then everything just works - no messing with libs and relative include paths.