Browse Source

Detect incompatible libtorrent v2 versions in build systems

Although the detection is working, the error message in autotools is not
perfect, i.e. it would only mention valid range for libtorrent v1 and it
shouldn't be a problem since v2 support isn't fully ready yet.
adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
7d7f967d5e
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 3
      CMakeLists.txt
  2. 12
      INSTALL
  3. 214
      configure
  4. 8
      configure.ac
  5. 62
      src/CMakeLists.txt

3
CMakeLists.txt

@ -14,7 +14,8 @@ set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
set(minBoostVersion 1.65) set(minBoostVersion 1.65)
set(minQtVersion 5.15.2) set(minQtVersion 5.15.2)
set(minOpenSSLVersion 1.1.1) set(minOpenSSLVersion 1.1.1)
set(minLibtorrentVersion 1.2.14) set(minLibtorrent1Version 1.2.14)
set(minLibtorrentVersion 2.0.4)
set(minZlibVersion 1.2.11) set(minZlibVersion 1.2.11)
# features (some are platform-specific) # features (some are platform-specific)

12
INSTALL

@ -5,8 +5,8 @@ qBittorrent - A BitTorrent client in C++ / Qt
- Boost >= 1.65 - Boost >= 1.65
- libtorrent-rasterbar >= 1.2.14 (by Arvid Norberg) - libtorrent-rasterbar: (>= 1.2.14) || (>= 2.0.4)
* https://www.libtorrent.org/ * By Arvid Norberg, https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name * Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.1.1 - OpenSSL >= 1.1.1
@ -15,10 +15,12 @@ qBittorrent - A BitTorrent client in C++ / Qt
- zlib >= 1.2.11 - zlib >= 1.2.11
- pkg-config (compile-time only on *nix systems) - pkg-config
* Compile-time only on *nix systems
- Python >= 3.5.0 (optional, runtime only) - Python >= 3.5.0
* Required by the internal search engine * Optional, run-time only
* Used by the bundled search engine
Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build. Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build.
You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own. You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own.

214
configure vendored

@ -5522,8 +5522,8 @@ if test "x$enable_gui" = "xyes"
then : then :
pkg_failed=no pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5Svg" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Qt5Svg >= 5.15.2" >&5
printf %s "checking for Qt5Svg... " >&6; } printf %s "checking for Qt5Svg >= 5.15.2... " >&6; }
if test -n "$Qt5Svg_CFLAGS"; then if test -n "$Qt5Svg_CFLAGS"; then
pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS" pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS"
@ -5563,7 +5563,7 @@ fi
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@ -5590,7 +5590,7 @@ Alternatively, you may set the environment variables Qt5Svg_CFLAGS
and Qt5Svg_LIBS to avoid the need to call pkg-config. and Qt5Svg_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5 See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@ -6032,19 +6032,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
pkg_failed=no pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent-rasterbar >= 2.0.4" >&5
printf %s "checking for libtorrent... " >&6; } printf %s "checking for libtorrent-rasterbar >= 2.0.4... " >&6; }
if test -n "$libtorrent_CFLAGS"; then if test -n "$libtorrent_CFLAGS"; then
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS" pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 2.0.4\""; } >&5
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14") 2>&5 ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 2.0.4") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.14" 2>/dev/null` pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 2.0.4" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -6056,12 +6056,12 @@ if test -n "$libtorrent_LIBS"; then
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS" pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
elif test -n "$PKG_CONFIG"; then elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \ if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14\""; } >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 2.0.4\""; } >&5
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14") 2>&5 ($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 2.0.4") 2>&5
ac_status=$? ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then test $ac_status = 0; }; then
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.14" 2>/dev/null` pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 2.0.4" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes test "x$?" != "x0" && pkg_failed=yes
else else
pkg_failed=yes pkg_failed=yes
@ -6073,7 +6073,7 @@ fi
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@ -6082,14 +6082,167 @@ else
_pkg_short_errors_supported=no _pkg_short_errors_supported=no
fi fi
if test $_pkg_short_errors_supported = yes; then if test $_pkg_short_errors_supported = yes; then
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14" 2>&1` libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 2.0.4" 2>&1`
else else
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14" 2>&1` libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 2.0.4" 2>&1`
fi fi
# Put the nasty error message in config.log where it belongs # Put the nasty error message in config.log where it belongs
echo "$libtorrent_PKG_ERRORS" >&5 echo "$libtorrent_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.14) were not met:
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" >&5
printf %s "checking for libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2... " >&6; }
if test -n "$libtorrent_CFLAGS"; then
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2\""; } >&5
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$libtorrent_LIBS"; then
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2\""; } >&5
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>&1`
else
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$libtorrent_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2) were not met:
$libtorrent_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables libtorrent_CFLAGS
and libtorrent_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables libtorrent_CFLAGS
and libtorrent_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
libtorrent_CFLAGS=$pkg_cv_libtorrent_CFLAGS
libtorrent_LIBS=$pkg_cv_libtorrent_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"
fi
elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" >&5
printf %s "checking for libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2... " >&6; }
if test -n "$libtorrent_CFLAGS"; then
pkg_cv_libtorrent_CFLAGS="$libtorrent_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2\""; } >&5
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_libtorrent_CFLAGS=`$PKG_CONFIG --cflags "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$libtorrent_LIBS"; then
pkg_cv_libtorrent_LIBS="$libtorrent_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2\""; } >&5
($PKG_CONFIG --exists --print-errors "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_libtorrent_LIBS=`$PKG_CONFIG --libs "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
libtorrent_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>&1`
else
libtorrent_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$libtorrent_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2) were not met:
$libtorrent_PKG_ERRORS $libtorrent_PKG_ERRORS
@ -6100,7 +6253,7 @@ Alternatively, you may set the environment variables libtorrent_CFLAGS
and libtorrent_LIBS to avoid the need to call pkg-config. and libtorrent_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5 See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@ -6119,14 +6272,20 @@ else
libtorrent_LIBS=$pkg_cv_libtorrent_LIBS libtorrent_LIBS=$pkg_cv_libtorrent_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; } printf "%s\n" "yes" >&6; }
CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"
LIBS="$libtorrent_LIBS $LIBS" fi
else
libtorrent_CFLAGS=$pkg_cv_libtorrent_CFLAGS
libtorrent_LIBS=$pkg_cv_libtorrent_LIBS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"
fi fi
pkg_failed=no pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl >= 1.1.1" >&5
printf %s "checking for openssl... " >&6; } printf %s "checking for openssl >= 1.1.1... " >&6; }
if test -n "$openssl_CFLAGS"; then if test -n "$openssl_CFLAGS"; then
pkg_cv_openssl_CFLAGS="$openssl_CFLAGS" pkg_cv_openssl_CFLAGS="$openssl_CFLAGS"
@ -6166,7 +6325,7 @@ fi
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@ -6193,7 +6352,7 @@ Alternatively, you may set the environment variables openssl_CFLAGS
and openssl_LIBS to avoid the need to call pkg-config. and openssl_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5 See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@ -6218,8 +6377,8 @@ fi
pkg_failed=no pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.11" >&5
printf %s "checking for zlib... " >&6; } printf %s "checking for zlib >= 1.2.11... " >&6; }
if test -n "$zlib_CFLAGS"; then if test -n "$zlib_CFLAGS"; then
pkg_cv_zlib_CFLAGS="$zlib_CFLAGS" pkg_cv_zlib_CFLAGS="$zlib_CFLAGS"
@ -6259,7 +6418,7 @@ fi
if test $pkg_failed = yes; then if test $pkg_failed = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@ -6286,7 +6445,7 @@ Alternatively, you may set the environment variables zlib_CFLAGS
and zlib_LIBS to avoid the need to call pkg-config. and zlib_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5 See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then elif test $pkg_failed = untried; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; } printf "%s\n" "no" >&6; }
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
@ -7845,3 +8004,4 @@ fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Good, the configure finished." >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Good, the configure finished." >&5
printf "%s\n" "$as_me: Good, the configure finished." >&6;} printf "%s\n" "$as_me: Good, the configure finished." >&6;}
printf "%s\n" printf "%s\n"

8
configure.ac

@ -177,9 +177,11 @@ AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"]) [QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
PKG_CHECK_MODULES(libtorrent, PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.2.14], [libtorrent-rasterbar >= 2.0.4],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" [CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"],
LIBS="$libtorrent_LIBS $LIBS"]) [PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.2.14 libtorrent-rasterbar < 2],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" LIBS="$libtorrent_LIBS $LIBS"])])
PKG_CHECK_MODULES(openssl, PKG_CHECK_MODULES(openssl,
[openssl >= 1.1.1], [openssl >= 1.1.1],

62
src/CMakeLists.txt

@ -1,35 +1,43 @@
if (UNIX AND (NOT APPLE) AND (NOT CYGWIN)) macro(find_libtorrent version)
find_package(LibtorrentRasterbar QUIET ${minLibtorrentVersion} COMPONENTS torrent-rasterbar) if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
if (NOT LibtorrentRasterbar_FOUND) find_package(LibtorrentRasterbar QUIET ${version} COMPONENTS torrent-rasterbar)
include(FindPkgConfig) if (NOT LibtorrentRasterbar_FOUND)
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${minLibtorrentVersion}") include(FindPkgConfig)
if (NOT LIBTORRENT_RASTERBAR_FOUND) pkg_check_modules(LibtorrentRasterbar IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${version}")
message( if (NOT LibtorrentRasterbar_FOUND)
FATAL_ERROR message(
"Package LibtorrentRasterbar >= ${minLibtorrentVersion} not found" FATAL_ERROR
" with CMake or pkg-config.\n- Set LibtorrentRasterbar_DIR to a directory containing" "Package LibtorrentRasterbar >= ${version} not found"
" a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar" " with CMake or pkg-config.\n- Set LibtorrentRasterbar_DIR to a directory containing"
" to CMAKE_PREFIX_PATH.\n- Alternatively, make sure there is a valid libtorrent-rasterbar.pc" " a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar"
" file in your system's pkg-config search paths (use the system environment variable PKG_CONFIG_PATH" " to CMAKE_PREFIX_PATH.\n- Alternatively, make sure there is a valid libtorrent-rasterbar.pc"
" to specify additional search paths if needed)." " file in your system's pkg-config search paths (use the system environment variable PKG_CONFIG_PATH"
" to specify additional search paths if needed)."
)
endif()
add_library(LibtorrentRasterbar::torrent-rasterbar ALIAS PkgConfig::LibtorrentRasterbar)
# force a fake package to show up in the feature summary
set_property(GLOBAL APPEND PROPERTY
PACKAGES_FOUND
"LibtorrentRasterbar via pkg-config (version >= ${version})"
) )
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${version})"
PROPERTIES
TYPE REQUIRED
)
else()
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
endif() endif()
add_library(LibtorrentRasterbar::torrent-rasterbar ALIAS PkgConfig::LIBTORRENT_RASTERBAR)
# force a fake package to show up in the feature summary
set_property(GLOBAL APPEND PROPERTY
PACKAGES_FOUND
"LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
)
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
PROPERTIES
TYPE REQUIRED
)
else() else()
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED) find_package(LibtorrentRasterbar ${version} REQUIRED COMPONENTS torrent-rasterbar)
endif() endif()
else() endmacro()
find_package(LibtorrentRasterbar ${minLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
find_libtorrent(${minLibtorrent1Version})
if (LibtorrentRasterbar_FOUND AND (LibtorrentRasterbar_VERSION VERSION_GREATER_EQUAL 2.0))
find_libtorrent(${minLibtorrentVersion})
endif() endif()
# force variable type so that it always shows up in ccmake/cmake-gui frontends # force variable type so that it always shows up in ccmake/cmake-gui frontends
set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH) set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
find_package(Boost ${minBoostVersion} REQUIRED) find_package(Boost ${minBoostVersion} REQUIRED)

Loading…
Cancel
Save