|
1 | | -# Adapt these paths on Windows |
2 | | - |
3 | | -# Point this to the boost include folder |
4 | | -INCLUDEPATH += $$quote(C:/qBittorrent/boost_1_51_0) |
5 | | -# Point this to the libtorrent include folder |
6 | | -INCLUDEPATH += $$quote(C:/qBittorrent/RC_0_16/include) |
7 | | -# Point this to the zlib include folder |
8 | | -INCLUDEPATH += $$quote(C:/qBittorrent/Zlib/include) |
9 | | -# Point this to the openssl include folder |
10 | | -INCLUDEPATH += $$quote(C:/qBittorrent/openssl/include) |
11 | | - |
12 | | -# Point this to the boost lib folder |
13 | | -LIBS += $$quote(-LC:/qBittorrent/boost_1_51_0/stage/lib) |
14 | | -# Point this to the libtorrent lib folder |
15 | | -LIBS += $$quote(-LC:/qBittorrent/RC_0_16/bin/path-according-to-the-build-options-chosen) |
16 | | -# Point this to the zlib lib folder |
17 | | -LIBS += $$quote(-LC:/qBittorrent/Zlib/lib) |
18 | | -# Point this to the openssl lib folder |
19 | | -LIBS += $$quote(-LC:/qBittorrent/openssl/lib) |
20 | | - |
21 | | -# BOOST DEFINES |
22 | | -DEFINES += BOOST_ALL_NO_LIB |
23 | 1 | DEFINES += BOOST_ASIO_HASH_MAP_BUCKETS=1021 |
24 | | -# Disable this if building against libtorrent 1.1.x (RC_1_1) |
25 | | -DEFINES += BOOST_ASIO_SEPARATE_COMPILATION |
26 | 2 | # After 1.55 some Windows users reported regular UI freezes. |
27 | 3 | # This makes ASIO use the pre-1.56 way of doing things. See issue #2003 |
28 | 4 | DEFINES += BOOST_ASIO_DISABLE_CONNECTEX |
29 | | -# Boost 1.60+ defaults to Vista+ support. The define below enables XP support again. |
30 | | -DEFINES += BOOST_USE_WINAPI_VERSION=0x0501 |
31 | 5 | DEFINES += BOOST_EXCEPTION_DISABLE |
32 | | -DEFINES += BOOST_SYSTEM_STATIC_LINK=1 |
33 | 6 |
|
34 | | -# LIBTORRENT DEFINES |
35 | 7 | DEFINES += TORRENT_USE_OPENSSL |
36 | 8 | DEFINES += TORRENT_DISABLE_GEO_IP |
37 | 9 | DEFINES += TORRENT_DISABLE_RESOLVE_COUNTRIES |
38 | 10 |
|
39 | | -# QBT DEFINES |
40 | 11 | DEFINES += UNICODE |
41 | 12 | DEFINES += _UNICODE |
42 | 13 | DEFINES += WIN32 |
43 | 14 | DEFINES += _WIN32 |
44 | 15 | DEFINES += WIN32_LEAN_AND_MEAN |
45 | | -DEFINES += NTDDI_VERSION=0x05010000 |
46 | | -DEFINES += _WIN32_WINNT=0x0501 |
47 | | -DEFINES += _WIN32_IE=0x0501 |
48 | 16 | DEFINES += _CRT_SECURE_NO_DEPRECATE |
49 | 17 | DEFINES += _SCL_SECURE_NO_DEPRECATE |
50 | 18 | DEFINES += __USE_W32_SOCKETS |
51 | 19 | DEFINES += _FILE_OFFSET_BITS=64 |
52 | 20 | DEFINES += NOMINMAX |
53 | 21 |
|
54 | 22 | CONFIG(debug, debug|release) { |
55 | | - DEFINES += TORRENT_DEBUG |
56 | | -} else { |
57 | | - DEFINES += NDEBUG |
| 23 | + DEFINES += TORRENT_DEBUG |
| 24 | +} |
| 25 | +else { |
| 26 | + DEFINES += NDEBUG |
58 | 27 | } |
59 | | - |
60 | | -# Enable backtrace support |
61 | | -CONFIG += strace_win |
62 | 28 |
|
63 | 29 | win32-g++* { |
64 | | - include(winconf-mingw.pri) |
| 30 | + CONFIG(debug, debug|release) { |
| 31 | + # Make sure binary is not relocatable, otherwise debugging will fail |
| 32 | + QMAKE_LFLAGS -= -Wl,--dynamicbase |
| 33 | + } |
| 34 | + |
| 35 | + RC_FILE = qbittorrent_mingw.rc |
| 36 | + |
| 37 | + LIBS += libadvapi32 libshell32 libuser32 libole32 libwsock32 libws2_32 libpowrprof |
| 38 | +} |
| 39 | +else:win32-msvc* { |
| 40 | + CONFIG -= embed_manifest_exe |
| 41 | + QMAKE_LFLAGS += "/MANIFEST:EMBED /MANIFESTINPUT:$$quote($${PWD}/src/qbittorrent.exe.manifest) /STACK:0x800000" |
| 42 | + QMAKE_LFLAGS_RELEASE += "/OPT:REF /OPT:ICF" |
| 43 | + |
| 44 | + RC_FILE = qbittorrent.rc |
| 45 | + |
| 46 | + LIBS += advapi32.lib shell32.lib crypt32.lib User32.lib ole32.lib PowrProf.lib |
| 47 | +} |
| 48 | + |
| 49 | +# See an example build configuration in "conf.pri.windows" |
| 50 | +exists(conf.pri) { |
| 51 | + include(conf.pri) |
65 | 52 | } |
66 | 53 | else { |
67 | | - include(winconf-msvc.pri) |
| 54 | + error("'conf.pri' does not exist. See an example configuration in 'conf.pri.windows'.") |
| 55 | +} |
| 56 | + |
| 57 | +# Stack trace support can be enabled in 'conf.pri' |
| 58 | +strace_win { |
| 59 | + win32-g++* { |
| 60 | + contains(QMAKE_HOST.arch, x86) { |
| 61 | + # i686 arch requires frame pointer preservation |
| 62 | + QMAKE_CXXFLAGS += -fno-omit-frame-pointer |
| 63 | + } |
| 64 | + |
| 65 | + QMAKE_LFLAGS += -Wl,--export-all-symbols |
| 66 | + |
| 67 | + LIBS += libdbghelp |
| 68 | + } |
| 69 | + else:win32-msvc* { |
| 70 | + contains(QMAKE_HOST.arch, x86) { |
| 71 | + # i686 arch requires frame pointer preservation |
| 72 | + QMAKE_CXXFLAGS += -Oy- |
| 73 | + } |
| 74 | + |
| 75 | + QMAKE_CXXFLAGS *= -Zi |
| 76 | + QMAKE_LFLAGS *= "/DEBUG" |
| 77 | + |
| 78 | + LIBS += dbghelp.lib |
| 79 | + } |
68 | 80 | } |
0 commit comments