From 0ecdc46fbf9cdab24be92e785ec59b2338634cb1 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner 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