summaryrefslogtreecommitdiff
path: root/app-text/kbibtex/files/kbibtex-revert-removing-qtoauth.patch
blob: 3e0195b48541c5207e5bdcbf2eaa5d93d887fd2b (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
From 0ecdc46fbf9cdab24be92e785ec59b2338634cb1 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date: Sun, 24 Jan 2016 13:04:26 +0100
Subject: [PATCH 1/2] Revert "Removing references to QtOAuth and Qca-Qt5"

This reverts commit ff4b966f13b1b8da8471f92f44751b58012a53e8.

REVIEW: 129927
---
 CMakeLists.txt                | 20 ++++++++++++++++++++
 src/networking/CMakeLists.txt | 33 +++++++++++++++++++++++++++++++--
 2 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8620185..b22b5ef8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,6 +152,26 @@ endif(
 )
 
 find_package(
+    QtOAuth
+)
+if(
+    QTOAUTH_FOUND
+)
+    add_definitions(
+        -DHAVE_QTOAUTH
+    )
+else(
+    QTOAUTH_FOUND
+)
+    message(
+        STATUS
+        "No QtOAuth installed, disabling Zotero OAuth wizard"
+    )
+endif(
+    QTOAUTH_FOUND
+)
+
+find_package(
     Qca-qt5 "2.1.0"
     REQUIRED
 )
diff --git a/src/networking/CMakeLists.txt b/src/networking/CMakeLists.txt
index f99236c1..27507b3a 100644
--- a/src/networking/CMakeLists.txt
+++ b/src/networking/CMakeLists.txt
@@ -40,7 +40,6 @@ if(NOT WIN32)
         zotero/collection.cpp
         zotero/items.cpp
         zotero/groups.cpp
-        zotero/oauthwizard.cpp
         zotero/tags.cpp
         zotero/tagmodel.cpp
         # QOAuth for Qt5 from Git
@@ -79,7 +78,6 @@ set(
     zotero/tagmodel.h
     zotero/items.h
     zotero/api.h
-    zotero/oauthwizard.h
     associatedfiles.h
     findpdf.h
     internalnetworkaccessmanager.h
@@ -102,6 +100,26 @@ include_directories(
     ${CMAKE_SOURCE_DIR}/src/global
 )
 
+if(
+    QTOAUTH_FOUND
+)
+    include_directories(
+        ${QTOAUTH_INCLUDE_DIR}
+    )
+    set(
+        kbibtexnetworking_HDRS
+        ${kbibtexnetworking_HDRS}
+        zotero/oauthwizard.h
+    )
+    set(
+        kbibtexnetworking_LIB_SRCS
+        ${kbibtexnetworking_LIB_SRCS}
+        zotero/oauthwizard.cpp
+    )
+endif(
+    QTOAUTH_FOUND
+)
+
 add_library(
     kbibtexnetworking
     SHARED
@@ -128,6 +146,17 @@ target_link_libraries(
     ${Poppler_Qt5_LIBRARY}
 )
 
+if(
+    QTOAUTH_FOUND
+)
+    target_link_libraries(
+      kbibtexnetworking
+      ${QTOAUTH_LIBRARY}
+    )
+endif(
+    QTOAUTH_FOUND
+)
+
 set_target_properties(
     kbibtexnetworking
     PROPERTIES
-- 
2.12.2