Tweak default UI

It's desktop unless you're building for Android where the default it's
mobile.

You can still manually specify which UI you want and you'll get that
regardless of the platform

Only require KParts if we're building the desktop UI

Two small changes in CI:
 * Stop pretending we have a macOS CI
 * Add Android CI
    - libkexiv2, khtml and kjs would be nice but we don't have Android builds
      yet
This commit is contained in:
Albert Astals Cid 2021-12-01 00:15:56 +01:00
parent 031f937113
commit 3792d8d560
3 changed files with 22 additions and 6 deletions

View File

@ -2,6 +2,7 @@ variables:
DEBIAN_FRONTEND: "noninteractive"
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml

View File

@ -9,13 +9,17 @@ Dependencies:
'frameworks/ki18n': '@stable'
'frameworks/kio': '@stable'
'frameworks/karchive': '@stable'
'frameworks/khtml': '@stable'
'frameworks/kjs': '@stable'
'libraries/phonon': '@stable'
'graphics/libkexiv2': '@same'
'graphics/kdegraphics-mobipocket': '@same'
- 'on': ['Linux', 'FreeBSD', 'macOS']
- 'on': ['Linux', 'FreeBSD']
'require':
'frameworks/kactivities': '@stable'
'frameworks/khtml': '@stable'
'frameworks/kjs': '@stable'
'frameworks/kpty': '@stable'
'graphics/libkexiv2': '@same'
- 'on': ['Android']
'require':
'frameworks/kirigami': '@stable'

View File

@ -11,7 +11,15 @@ project(okular VERSION ${RELEASE_SERVICE_VERSION})
set(QT_REQUIRED_VERSION "5.12.0") # Remember to update the QT_DEPRECATED_WARNINGS_SINCE below
set(KF5_REQUIRED_VERSION "5.68.0") # Remember to update the KF_DEPRECATED_WARNINGS_SINCE below
set(OKULAR_UI "desktop" CACHE STRING "Which Okular user interface to build. Possible values: desktop, mobile, both. Default: desktop")
set(OKULAR_UI "" CACHE STRING "Which Okular user interface to build. Possible values: desktop, mobile, both. Default: desktop (except on Android, where it is 'mobile')")
if(OKULAR_UI STREQUAL "")
if(ANDROID)
set(OKULAR_UI "mobile")
else()
set(OKULAR_UI "desktop")
endif()
endif()
if(OKULAR_UI STREQUAL "desktop" OR OKULAR_UI STREQUAL "both")
set(BUILD_DESKTOP ON)
@ -94,7 +102,6 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
I18n
IconThemes
KIO
Parts
TextWidgets
ThreadWeaver
WindowSystem
@ -104,6 +111,10 @@ find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS
Wallet
)
if (BUILD_DESKTOP)
find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS Parts)
endif()
if(KF5Wallet_FOUND)
add_definitions(-DWITH_KWALLET=1)
endif()