summaryrefslogtreecommitdiff
path: root/app-text/kbibtex/files/kbibtex-revert-removing-qtoauth.patch
blob: 6956d3c616f2203fc26951bb7246c0c70ed746c1 (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
113
114
commit 77047809b742c3b53ad0f31feddd4029525038e7
Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date:   Sun Jan 24 13:04:26 2016 +0100

    Revert "Removing references to QtOAuth and Qca-Qt5"
    
    This reverts commit ff4b966f13b1b8da8471f92f44751b58012a53e8.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb33c9e..082b1bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,6 +160,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
 )
@@ -168,7 +188,7 @@ find_package(
 # TODO isn't there an "official" way to determine this directory?
 find_path(
     QTCRYPTO_INCLUDE_DIR qca.h
-    HINTS ENV ${Qt5Core_INCLUDE_DIRS} ENV ${QT_INCLUDES}
+    HINTS ${QTOAUTH_INCLUDE_DIR} ENV ${Qt5Core_INCLUDE_DIRS} ENV ${QT_INCLUDES}
     PATH_SUFFIXES QtCrypto
 )
 
diff --git a/src/networking/CMakeLists.txt b/src/networking/CMakeLists.txt
index f2f725b..4408821 100644
--- a/src/networking/CMakeLists.txt
+++ b/src/networking/CMakeLists.txt
@@ -30,7 +30,6 @@ set(
     zotero/tags.cpp
     zotero/tagmodel.cpp
     zotero/items.cpp
-    zotero/oauthwizard.cpp
     associatedfiles.cpp
     findpdf.cpp
     internalnetworkaccessmanager.cpp
@@ -70,7 +69,6 @@ set(
     zotero/tagmodel.h
     zotero/items.h
     zotero/api.h
-    zotero/oauthwizard.h
     associatedfiles.h
     findpdf.h
     internalnetworkaccessmanager.h
@@ -94,6 +92,26 @@ include_directories(
     ${LIBXML2_INCLUDE_DIR}
 )
 
+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
@@ -119,6 +137,18 @@ target_link_libraries(
     qca-qt5
 )
 
+if(
+    QTOAUTH_FOUND
+)
+    target_link_libraries(
+      kbibtexnetworking
+      ${cmake_2_8_12_PRIVATE}
+      ${QTOAUTH_LIBRARY}
+    )
+endif(
+    QTOAUTH_FOUND
+)
+
 set_target_properties(
     kbibtexnetworking
     PROPERTIES