Skip to content

Instantly share code, notes, and snippets.

@silverqx
Created September 26, 2017 16:05
Show Gist options
  • Save silverqx/ca012d929a11ca83b20f14272eae6431 to your computer and use it in GitHub Desktop.
Save silverqx/ca012d929a11ca83b20f14272eae6431 to your computer and use it in GitHub Desktop.
INCLUDEPATH += $$quote(E:/c/qbittorrent_64/install_msvc/base/include)
INCLUDEPATH += $$quote(E:/c/qbittorrent_64/install_msvc/base/include/boost-1_64)
LIBS += $$quote(-LE:/c/qbittorrent_64/install_msvc/base/lib)
# BOOST DEFINES
# Disable this if building against libtorrent 1.1.x (RC_1_1)
DEFINES -= BOOST_ASIO_SEPARATE_COMPILATION
DEFINES -= BOOST_USE_WINAPI_VERSION=0x0501
DEFINES -= BOOST_SYSTEM_STATIC_LINK=1
DEFINES += BOOST_ASIO_ENABLE_CANCELIO
DEFINES += BOOST_USE_WINAPI_VERSION=0x0600
DEFINES += BOOST_ALL_DYN_LINK
# LIBTORRENT DEFINES
DEFINES += TORRENT_LINKING_SHARED
# QBT DEFINES
# Disables XP support
DEFINES -= NTDDI_VERSION=0x05010000
DEFINES -= _WIN32_WINNT=0x0501
DEFINES -= _WIN32_IE=0x0501
DEFINES += NTDDI_VERSION=0x06000000
DEFINES += _WIN32_WINNT=0x0600
DEFINES += _WIN32_IE=0x0600
QMAKE_LFLAGS += "/NODEFAULTLIB:MSVCRT"
# Adapt the lib names/versions accordingly
CONFIG(debug, debug|release) {
LIBS -= libtorrentd.lib \
libboost_system-vc90-mt-sgd-1_51.lib
LIBS += torrentd.lib \
boost_system-vc140-mt-gd-1_64.lib
} else {
LIBS -= libtorrent.lib \
libboost_system-vc90-mt-s-1_51.lib
LIBS += torrent.lib \
boost_system-vc140-mt-1_64.lib
}
LIBS += Ole32.lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment