Cloud storage: only make this available with new enough libgit2

The credential callback doesn't appear to work (at least not the way I
implemented it) with v0.22 and earlier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-01 09:58:09 -07:00
parent e84d8624bb
commit 0c2457d9dc
2 changed files with 7 additions and 0 deletions

View file

@ -44,6 +44,7 @@ if(LIBGIT2_FROM_PKGCONFIG)
set(LIBGIT2_LIBRARIES "")
if(USE_LIBGIT23_API)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBGIT23_API")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LIBGIT23_API")
pkg_config_library(LIBSSH2 libssh2 REQUIRED)
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBSSH2_LIBRARIES})
endif()
@ -52,6 +53,7 @@ else()
include_directories(${LIBGIT2_INCLUDE_DIR})
if(USE_LIBGIT23_API)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_LIBGIT23_API")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LIBGIT23_API")
set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -lssh2)
endif()
endif()

View file

@ -148,6 +148,11 @@ MainWindow::MainWindow() : QMainWindow(),
plannerDetails->printPlan()->hide();
ui.menuFile->removeAction(ui.actionPrint);
#endif
#ifndef USE_LIBGIT23_API
ui.menuFile->removeAction(ui.actionCloudstorageopen);
ui.menuFile->removeAction(ui.actionCloudstoragesave);
qDebug() << "disabled / made invisible the cloud storage stuff";
#endif
ui.mainErrorMessage->hide();
graphics()->setEmptyState();