summaryrefslogtreecommitdiff
blob: 106079509f4c3220e20e9a12011762e6fb076985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 9b55e6ce1a98b4c2f32349982d4172d0971601c6 Mon Sep 17 00:00:00 2001
From: Peter Volkov <pva@gentoo.org>
Date: Thu, 16 Jun 2011 12:48:11 +0400
Subject: [PATCH 2/3] Add qt/config to make qmake aware about ./configure results. This simplifies use of system third-party tools. Fixes build issue caused by ordering of make/qmake run: bugs.gentoo.org/368523.

---
 configure.ac |    5 ++++-
 qt/config.in |    1 +
 qt/qtr.pro   |    6 +++---
 3 files changed, 8 insertions(+), 4 deletions(-)
 create mode 100644 qt/config.in

diff --git a/configure.ac b/configure.ac
index 421946f..bf0622b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,6 +222,7 @@ if test "x$want_utp" = "xyes" ; then
     if test "x$CXX" != "x" ; then
         LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
         LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a $libutp_extra_libs"
+        LIBUTP_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/libutp/libutp.a $libutp_extra_libs"
         AC_DEFINE([WITH_UTP],[1])
         build_utp="yes"
     else 
@@ -230,6 +231,7 @@ if test "x$want_utp" = "xyes" ; then
 fi 
 AC_SUBST(LIBUTP_CFLAGS)
 AC_SUBST(LIBUTP_LIBS)
+AC_SUBST(LIBUTP_LIBS_QT)
 AM_CONDITIONAL([BUILD_UTP],[test "x$build_utp" = "xyes"])
 AC_MSG_RESULT([$build_utp])
 
@@ -484,7 +486,8 @@ AC_CONFIG_FILES([Makefile
                  web/javascript/Makefile
                  web/javascript/jquery/Makefile
                  web/stylesheets/Makefile
-                 po/Makefile.in])
+                 po/Makefile.in
+		 qt/config])
 
 AC_OUTPUT
 
diff --git a/qt/config.in b/qt/config.in
new file mode 100644
index 0000000..3340d1a
--- /dev/null
+++ b/qt/config.in
@@ -0,0 +1 @@
+LIBUTP_LIBS = @LIBUTP_LIBS_QT@
diff --git a/qt/qtr.pro b/qt/qtr.pro
index ce138a2..4e28e98 100644
--- a/qt/qtr.pro
+++ b/qt/qtr.pro
@@ -16,12 +16,12 @@ QT += network
 PKGCONFIG = fontconfig libcurl openssl libevent
 
 TRANSMISSION_TOP = ..
+include(config)
+
 INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH}
 INCLUDEPATH += $${TRANSMISSION_TOP}
 LIBS += $${TRANSMISSION_TOP}/libtransmission/libtransmission.a
-exists( $${TRANSMISSION_TOP}/third-party/libutp/libutp.a ) { 
-    LIBS += $${TRANSMISSION_TOP}/third-party/libutp/libutp.a
-}
+LIBS += $${LIBUTP_LIBS}
 LIBS += $${TRANSMISSION_TOP}/third-party/dht/libdht.a
 LIBS += $${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a
 LIBS += $${TRANSMISSION_TOP}/third-party/libnatpmp/libnatpmp.a
-- 
1.7.3.4