Don't require D-Bus on Android

Also, actually fully disable the build of okularpart, which isn't needed
on Android.

With this Okular can be built for Android without the D-Bus stub, at least
once KIO doesn't pull in D-Bus anymore.
remotes/origin/work/schwarzer/update_platform_name
Volker Krause 5 years ago committed by Albert Astals Cid
parent 45baa05248
commit 2a7e4416b5
  1. 8
      CMakeLists.txt
  2. 2
      generators/kimgio/CMakeLists.txt
  3. 2
      shell/CMakeLists.txt

@ -54,7 +54,10 @@ ecm_setup_version(${PROJECT_VERSION}
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/core/version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/Okular5ConfigVersion.cmake")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Test Widgets PrintSupport Svg Qml Quick)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Test Widgets PrintSupport Svg Qml Quick)
if (BUILD_DESKTOP)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS DBus)
endif()
find_package(Qt5 ${QT_REQUIRED_VERSION} OPTIONAL_COMPONENTS TextToSpeech)
if (NOT Qt5TextToSpeech_FOUND)
message(STATUS "Qt5TextToSpeech not found, speech features will be disabled")
@ -422,7 +425,6 @@ if(BUILD_DESKTOP)
part/signaturemodel.cpp
part/signaturepanel.cpp
)
endif()
if (Qt5TextToSpeech_FOUND)
set(okularpart_SRCS ${okularpart_SRCS}
@ -437,6 +439,7 @@ generate_export_header(okularpart BASE_NAME okularpart)
target_link_libraries(okularpart okularcore
${MATH_LIB}
Qt5::Svg
Qt5::DBus
Phonon::phonon4qt5
KF5::Archive
KF5::Bookmarks
@ -466,6 +469,7 @@ if (Qt5TextToSpeech_FOUND)
target_link_libraries(okularpart Qt5::TextToSpeech)
endif()
install(TARGETS okularpart DESTINATION ${KDE_INSTALL_PLUGINDIR})
endif()
########### install files ###############

@ -6,7 +6,7 @@ add_definitions(-DTRANSLATION_DOMAIN="okular_kimgio")
okular_add_generator(okularGenerator_kimgio generator_kimgio.cpp)
target_link_libraries(okularGenerator_kimgio okularcore KF5::KExiv2 KF5::I18n)
if(BUILD_TESTING)
if(BUILD_TESTING AND BUILD_DESKTOP)
add_definitions( -DKDESRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/" )
set( kimgiotest_SRCS tests/kimgiotest.cpp ${CMAKE_SOURCE_DIR}/part/pagepainter.cpp ${CMAKE_SOURCE_DIR}/part/guiutils.cpp ${CMAKE_SOURCE_DIR}/part/debug_ui.cpp )
ecm_add_test(${kimgiotest_SRCS} TEST_NAME "kimgiotest" LINK_LIBRARIES okularcore okularpart Qt5::Svg Qt5::Test)

@ -18,7 +18,7 @@ ecm_add_app_icon(okular_SRCS ICONS ${ICONS_SRCS})
add_executable(okular ${okular_SRCS})
target_link_libraries(okular KF5::I18n KF5::Parts KF5::WindowSystem KF5::Crash)
target_link_libraries(okular KF5::I18n KF5::Parts KF5::WindowSystem KF5::Crash Qt5::DBus)
if(TARGET KF5::Activities)
target_compile_definitions(okular PUBLIC -DWITH_KACTIVITIES=1)

Loading…
Cancel
Save