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)
|
2020-12-09 04:53:52 +00:00
|
|
|
target_link_libraries(okularkirigami Qt5::Widgets Qt5::Qml KF5::I18n KF5::CoreAddons)
|
2018-05-17 17:52:01 +00:00
|
|
|
if (ANDROID)
|
2018-05-17 23:44:18 +00:00
|
|
|
find_package(Qt5 COMPONENTS AndroidExtras)
|
2018-05-17 17:52:01 +00:00
|
|
|
target_sources(okularkirigami PRIVATE android.cpp)
|
2018-05-17 23:44:18 +00:00
|
|
|
target_link_libraries(okularkirigami Qt5::AndroidExtras)
|
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()
|
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
|
|
|
|
2018-04-18 00:17:24 +00:00
|
|
|
install(FILES package/metadata.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME org.kde.okular.kirigami.desktop)
|
|
|
|
install( FILES org.kde.okular.kirigami.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
|