diff --git a/CMakeLists.txt b/CMakeLists.txt index e1c5fb5..ddbb35a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,10 @@ option(BUILD_WITH_QT4 "Build qtkeychain with Qt4 no matter if Qt5 was found" OFF option(BUILD_TRANSLATIONS "Build translations" ON) option(QTKEYCHAIN_STATIC "Build static library" OFF) +if(CMAKE_SYSTEM_NAME STREQUAL Android) + set(ANDROID 1) +endif() + if (WIN32) option(USE_CREDENTIAL_STORE "Build with windows CredentialStore support" ON) @@ -37,7 +41,8 @@ endif() if (Qt5Core_FOUND) set(QTKEYCHAIN_VERSION_INFIX 5) - if(UNIX AND NOT APPLE) + + if(UNIX AND NOT APPLE AND NOT ANDROID) find_package(Qt5DBus REQUIRED) include_directories(${Qt5DBus_INCLUDE_DIRS}) set(QTDBUS_LIBRARIES ${Qt5DBus_LIBRARIES}) @@ -139,7 +144,7 @@ if(APPLE) list(APPEND qtkeychain_LIBRARIES ${SECURITY_LIBRARY}) endif() -if(UNIX AND NOT APPLE) +if(UNIX AND NOT APPLE AND NOT ANDROID) list(APPEND qtkeychain_SOURCES keychain_unix.cpp gnomekeyring.cpp) qt_add_dbus_interface(qtkeychain_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.KWallet.xml kwallet_interface KWalletInterface) list(APPEND qtkeychain_LIBRARIES ${QTDBUS_LIBRARIES} ) diff --git a/keychain_p.h b/keychain_p.h index 69e6fc9..f51b1db 100644 --- a/keychain_p.h +++ b/keychain_p.h @@ -15,7 +15,7 @@ #include #include -#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID) #include @@ -47,7 +47,7 @@ public: Mode mode; -#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID) org::kde::KWallet* iface; int walletHandle; @@ -92,7 +92,7 @@ public: explicit ReadPasswordJobPrivate( const QString &service_, ReadPasswordJob* qq ); void scheduledStart(); -#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID) void fallbackOnError(const QDBusError& err); private Q_SLOTS: @@ -115,7 +115,7 @@ public: explicit WritePasswordJobPrivate( const QString &service_, WritePasswordJob* qq ); void scheduledStart(); -#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID) void fallbackOnError(const QDBusError& err); #endif @@ -129,7 +129,7 @@ public: void scheduledStart(); -#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) && !defined(Q_OS_ANDROID) void fallbackOnError(const QDBusError& err); #endif