2018-04-13 16:07:38 +00:00
|
|
|
set(CMAKE_AUTORCC ON)
|
2020-12-09 04:53:52 +00:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../..
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/../../
|
|
|
|
)
|
2018-04-13 16:07:38 +00:00
|
|
|
add_executable(okularkirigami main.cpp app.qrc)
|
2023-09-22 13:40:51 +00:00
|
|
|
target_link_libraries(okularkirigami Qt6::Widgets Qt6::Qml KF6::I18n KF6::CoreAddons)
|
2018-05-17 17:52:01 +00:00
|
|
|
if (ANDROID)
|
|
|
|
target_sources(okularkirigami PRIVATE android.cpp)
|
2022-02-11 15:17:39 +00:00
|
|
|
|
2022-03-25 13:28:10 +00:00
|
|
|
# androiddeployqt only packages libraries needed by the main binary.
|
|
|
|
# That is problematic because some of the libraries we need we only use in plugins
|
|
|
|
# here we help androiddeployqt by linking those plugins dependencies
|
|
|
|
# to the app.
|
|
|
|
get_property(aux_list GLOBAL PROPERTY okular_generator_list)
|
|
|
|
foreach(okular_generator ${aux_list})
|
|
|
|
get_target_property(okular_generator_dependencies ${okular_generator} LINK_LIBRARIES)
|
|
|
|
target_link_libraries(okularkirigami ${okular_generator_dependencies})
|
|
|
|
endforeach()
|
|
|
|
|
2022-02-11 15:17:39 +00:00
|
|
|
# Unfortunately gitlab CI for now doesn't use Craft so we need
|
|
|
|
# to differentiate between gitlab CI and the binary factory
|
2022-02-24 13:12:34 +00:00
|
|
|
if (ANDROID_LINK_EXTRA_LIBRARIES)
|
|
|
|
message("Linking in extra libraries to help androiddeployqt")
|
2022-03-25 13:28:10 +00:00
|
|
|
# androiddeployqt only packages libraries needed by the main binary.
|
|
|
|
# the pdf/poppler generator links to poppler that links to NSS
|
|
|
|
# and NSS has plugins. Here we link to those plugins so they get packaged
|
2022-02-11 15:17:39 +00:00
|
|
|
pkg_check_modules(NSS "nss")
|
|
|
|
target_link_directories(okularkirigami PRIVATE ${NSS_LIBRARY_DIRS})
|
|
|
|
target_link_libraries(okularkirigami -lsoftokn3 -lnssckbi -lfreebl3)
|
|
|
|
endif()
|
2022-07-03 18:11:36 +00:00
|
|
|
|
|
|
|
kirigami_package_breeze_icons(ICONS
|
|
|
|
application-pkcs7-signature
|
|
|
|
bookmark-remove
|
|
|
|
bookmarks-organize
|
|
|
|
dialog-close
|
|
|
|
document-open
|
|
|
|
help-about-symbolic
|
2023-08-09 20:27:03 +00:00
|
|
|
okular
|
2022-07-03 18:11:36 +00:00
|
|
|
view-preview
|
|
|
|
view-table-of-contents-ltr
|
|
|
|
)
|
2018-05-17 17:52:01 +00:00
|
|
|
endif()
|
|
|
|
|
2018-04-13 16:07:38 +00:00
|
|
|
install(TARGETS okularkirigami ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
2012-05-14 18:38:35 +00:00
|
|
|
|
2023-12-07 00:33:04 +00:00
|
|
|
install(FILES package/metadata.desktop DESTINATION ${KDE_INSTALL_APPDIR} RENAME org.kde.okular.kirigami.desktop)
|
2018-04-18 00:17:24 +00:00
|
|
|
install( FILES org.kde.okular.kirigami.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
|