mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Allow to use system QJson. Closes #1744.
This commit is contained in:
parent
3047681951
commit
4493fd9c31
5 changed files with 165 additions and 4 deletions
23
configure.ac
23
configure.ac
|
@ -36,6 +36,12 @@ AC_ARG_WITH(qtsingleapplication,
|
|||
[],
|
||||
[with_qtsingleapplication=shipped])
|
||||
|
||||
AC_ARG_WITH(qjson,
|
||||
[AS_HELP_STRING([--with-qjson=@<:@system|shipped@:>@],
|
||||
[Use the shipped qjson library or the system one (default=shipped) (Qt4 only])],
|
||||
[],
|
||||
[with_qjson=shipped])
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[AS_HELP_STRING([--enable-debug],
|
||||
[Enable debug build])],
|
||||
|
@ -214,6 +220,23 @@ AS_CASE(["x$with_qtsingleapplication"],
|
|||
[AC_MSG_RESULT([$with_qtsingleapplication])
|
||||
AC_MSG_ERROR([Unknown option "$with_qtsingleapplication". Use either "system" or "shipped".])])
|
||||
|
||||
AS_IF([test "x$with_qt5" = "xno"],
|
||||
[AC_MSG_CHECKING([which qjson to use])
|
||||
AS_CASE(["x$with_qjson"],
|
||||
["xshipped"],
|
||||
[AC_MSG_RESULT([shipped])
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG usesystemqjson"],
|
||||
["xsystem"],
|
||||
[AC_MSG_RESULT([system])
|
||||
PKG_CHECK_MODULES(qjson,
|
||||
[QJson >= 0.8.1],
|
||||
[CPPFLAGS="$qjson_CFLAGS $CPPFLAGS"
|
||||
LIBS="$qjson_LIBS $LIBS"])
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG usesystemqjson"],
|
||||
[AC_MSG_RESULT([$with_qjson])
|
||||
AC_MSG_ERROR([Unknown option "$with_qjson". Use either "system" or "shipped".])])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(zlib,
|
||||
[zlib],
|
||||
[CPPFLAGS="$zlib_CFLAGS $CPPFLAGS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue