If libtorrent include directory not in the compiler search path, we have
to pass it to all qbt targets, because session.h includes
libtorrent/version.hpp
With pkg-config we can get a list of Boost components from Libtorrent
dependencies and make qBittorrent depend only on these libraries in
turn. For Windows user may provide a custom list via
LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES variable or use generic
list which consists of date_time, system, chrono, random, thread. As a
note: in case of using fully C++11 build, the actual list contains only
boost system library.
Qt resource is innitialized by a static object constructor (see
https://wiki.qt.io/QtResources). When we put resources into a static
library, the linker removes that static objects and thus the resources
themselves. To correct that we append resources to the main executable
sources list. This is done via custom function qbt_target_sources which
knows where to read the executable' name.