Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
1 | cmake_minimum_required(VERSION 3.5) | 1 | cmake_minimum_required(VERSION 3.5) | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | # KDE Application Version, managed by release script | 3 | # KDE Application Version, managed by release script | ||
4 | set (KDE_APPLICATIONS_VERSION_MAJOR "19") | 4 | set (KDE_APPLICATIONS_VERSION_MAJOR "19") | ||
5 | set (KDE_APPLICATIONS_VERSION_MINOR "08") | 5 | set (KDE_APPLICATIONS_VERSION_MINOR "11") | ||
6 | set (KDE_APPLICATIONS_VERSION_MICRO "2") | 6 | set (KDE_APPLICATIONS_VERSION_MICRO "70") | ||
7 | set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") | 7 | set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") | ||
8 | 8 | | |||
9 | project(okular VERSION 1.8.${KDE_APPLICATIONS_VERSION_MICRO}) | 9 | project(okular VERSION 1.8.${KDE_APPLICATIONS_VERSION_MICRO}) | ||
10 | 10 | | |||
11 | set(QT_REQUIRED_VERSION "5.9.0") | 11 | set(QT_REQUIRED_VERSION "5.9.0") | ||
12 | set(KF5_REQUIRED_VERSION "5.44.0") | 12 | set(KF5_REQUIRED_VERSION "5.44.0") | ||
13 | 13 | | |||
14 | if (ANDROID) | ||||
15 | set(QT_REQUIRED_VERSION "5.13.0") | ||||
16 | endif() | ||||
17 | | ||||
14 | find_package(ECM 5.33.0 CONFIG REQUIRED) | 18 | find_package(ECM 5.33.0 CONFIG REQUIRED) | ||
15 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) | 19 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH}) | ||
16 | 20 | | |||
17 | include(ECMInstallIcons) | 21 | include(ECMInstallIcons) | ||
18 | include(ECMSetupVersion) | 22 | include(ECMSetupVersion) | ||
19 | include(ECMOptionalAddSubdirectory) | 23 | include(ECMOptionalAddSubdirectory) | ||
20 | include(GenerateExportHeader) | 24 | include(GenerateExportHeader) | ||
21 | include(FeatureSummary) | 25 | include(FeatureSummary) | ||
Show All 13 Lines | |||||
35 | find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Test Widgets PrintSupport Svg Qml Quick) | 39 | find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Test Widgets PrintSupport Svg Qml Quick) | ||
36 | find_package(Qt5 ${QT_REQUIRED_VERSION} OPTIONAL_COMPONENTS TextToSpeech) | 40 | find_package(Qt5 ${QT_REQUIRED_VERSION} OPTIONAL_COMPONENTS TextToSpeech) | ||
37 | if (NOT Qt5TextToSpeech_FOUND) | 41 | if (NOT Qt5TextToSpeech_FOUND) | ||
38 | message(STATUS "Qt5TextToSpeech not found, speech features will be disabled") | 42 | message(STATUS "Qt5TextToSpeech not found, speech features will be disabled") | ||
39 | else() | 43 | else() | ||
40 | add_definitions(-DHAVE_SPEECH) | 44 | add_definitions(-DHAVE_SPEECH) | ||
41 | endif() | 45 | endif() | ||
42 | 46 | | |||
47 | if(ANDROID) | ||||
48 | find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS AndroidExtras) | ||||
49 | endif() | ||||
50 | | ||||
43 | if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") | 51 | if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") | ||
44 | # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. | 52 | # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros. | ||
45 | # 3.10+ lets us provide more macro names that require automoc. | 53 | # 3.10+ lets us provide more macro names that require automoc. | ||
46 | list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "OKULAR_EXPORT_PLUGIN") | 54 | list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "OKULAR_EXPORT_PLUGIN") | ||
47 | endif() | 55 | endif() | ||
48 | 56 | | |||
49 | set(optionalComponents) | 57 | set(optionalComponents) | ||
50 | if (ANDROID) | 58 | if (ANDROID) | ||
▲ Show 20 Lines • Show All 248 Lines • ▼ Show 20 Line(s) | 306 | if (KF5Wallet_FOUND) | |||
299 | target_link_libraries(okularcore PRIVATE KF5::Wallet) | 307 | target_link_libraries(okularcore PRIVATE KF5::Wallet) | ||
300 | endif() | 308 | endif() | ||
301 | if (KF5JS_FOUND) | 309 | if (KF5JS_FOUND) | ||
302 | target_sources(okularcore PRIVATE | 310 | target_sources(okularcore PRIVATE | ||
303 | core/script/executor_kjs.cpp | 311 | core/script/executor_kjs.cpp | ||
304 | core/script/kjs_app.cpp | 312 | core/script/kjs_app.cpp | ||
305 | core/script/kjs_console.cpp | 313 | core/script/kjs_console.cpp | ||
306 | core/script/kjs_data.cpp | 314 | core/script/kjs_data.cpp | ||
315 | core/script/kjs_display.cpp | ||||
307 | core/script/kjs_document.cpp | 316 | core/script/kjs_document.cpp | ||
308 | core/script/kjs_field.cpp | 317 | core/script/kjs_field.cpp | ||
309 | core/script/kjs_fullscreen.cpp | 318 | core/script/kjs_fullscreen.cpp | ||
310 | core/script/kjs_field.cpp | 319 | core/script/kjs_field.cpp | ||
311 | core/script/kjs_spell.cpp | 320 | core/script/kjs_spell.cpp | ||
312 | core/script/kjs_util.cpp | 321 | core/script/kjs_util.cpp | ||
313 | core/script/kjs_event.cpp | 322 | core/script/kjs_event.cpp | ||
323 | core/script/kjs_ocg.cpp | ||||
314 | ) | 324 | ) | ||
315 | target_link_libraries(okularcore PRIVATE KF5::JS KF5::JSApi) | 325 | target_link_libraries(okularcore PRIVATE KF5::JS KF5::JSApi) | ||
316 | endif() | 326 | endif() | ||
317 | 327 | | |||
318 | set_target_properties(okularcore PROPERTIES VERSION 9.0.0 SOVERSION 9 OUTPUT_NAME Okular5Core EXPORT_NAME Core) | 328 | set_target_properties(okularcore PROPERTIES VERSION 9.0.0 SOVERSION 9 OUTPUT_NAME Okular5Core EXPORT_NAME Core) | ||
319 | 329 | | |||
320 | install(TARGETS okularcore EXPORT Okular5Targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | 330 | install(TARGETS okularcore EXPORT Okular5Targets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | ||
321 | 331 | | |||
Show All 19 Lines | 338 | set(okularpart_conf_SRCS | |||
341 | conf/widgetdrawingtools.cpp | 351 | conf/widgetdrawingtools.cpp | ||
342 | ) | 352 | ) | ||
343 | 353 | | |||
344 | set(okularpart_SRCS | 354 | set(okularpart_SRCS | ||
345 | ${okularpart_conf_SRCS} | 355 | ${okularpart_conf_SRCS} | ||
346 | part.cpp | 356 | part.cpp | ||
347 | extensions.cpp | 357 | extensions.cpp | ||
348 | ui/embeddedfilesdialog.cpp | 358 | ui/embeddedfilesdialog.cpp | ||
359 | ui/annotationactionhandler.cpp | ||||
349 | ui/annotwindow.cpp | 360 | ui/annotwindow.cpp | ||
350 | ui/annotationmodel.cpp | 361 | ui/annotationmodel.cpp | ||
351 | ui/annotationpopup.cpp | 362 | ui/annotationpopup.cpp | ||
352 | ui/annotationpropertiesdialog.cpp | 363 | ui/annotationpropertiesdialog.cpp | ||
353 | ui/annotationproxymodels.cpp | 364 | ui/annotationproxymodels.cpp | ||
354 | ui/annotationtools.cpp | 365 | ui/annotationtools.cpp | ||
355 | ui/annotationwidgets.cpp | 366 | ui/annotationwidgets.cpp | ||
356 | ui/bookmarklist.cpp | 367 | ui/bookmarklist.cpp | ||
Show All 23 Lines | |||||
380 | ui/searchlineedit.cpp | 391 | ui/searchlineedit.cpp | ||
381 | ui/searchwidget.cpp | 392 | ui/searchwidget.cpp | ||
382 | ui/sidebar.cpp | 393 | ui/sidebar.cpp | ||
383 | ui/side_reviews.cpp | 394 | ui/side_reviews.cpp | ||
384 | ui/snapshottaker.cpp | 395 | ui/snapshottaker.cpp | ||
385 | ui/thumbnaillist.cpp | 396 | ui/thumbnaillist.cpp | ||
386 | ui/toc.cpp | 397 | ui/toc.cpp | ||
387 | ui/tocmodel.cpp | 398 | ui/tocmodel.cpp | ||
388 | ui/toolaction.cpp | 399 | ui/toggleactionmenu.cpp | ||
389 | ui/videowidget.cpp | 400 | ui/videowidget.cpp | ||
390 | ui/layers.cpp | 401 | ui/layers.cpp | ||
391 | ui/signatureguiutils.cpp | 402 | ui/signatureguiutils.cpp | ||
392 | ui/signaturepropertiesdialog.cpp | 403 | ui/signaturepropertiesdialog.cpp | ||
393 | ui/signaturemodel.cpp | 404 | ui/signaturemodel.cpp | ||
394 | ui/signaturepanel.cpp | 405 | ui/signaturepanel.cpp | ||
395 | ) | 406 | ) | ||
396 | 407 | | |||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | |||||
443 | if (Qt5TextToSpeech_FOUND) | 454 | if (Qt5TextToSpeech_FOUND) | ||
444 | target_link_libraries(okularpart Qt5::TextToSpeech) | 455 | target_link_libraries(okularpart Qt5::TextToSpeech) | ||
445 | endif() | 456 | endif() | ||
446 | install(TARGETS okularpart DESTINATION ${KDE_INSTALL_PLUGINDIR}) | 457 | install(TARGETS okularpart DESTINATION ${KDE_INSTALL_PLUGINDIR}) | ||
447 | 458 | | |||
448 | 459 | | |||
449 | ########### install files ############### | 460 | ########### install files ############### | ||
450 | 461 | | |||
451 | install(FILES okular.upd DESTINATION ${KDE_INSTALL_DATADIR}/kconf_update) | 462 | install(FILES okular.upd DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) | ||
452 | 463 | | |||
453 | install( FILES okular_part.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) | 464 | install( FILES okular_part.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) | ||
454 | install( FILES part.rc part-viewermode.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/okular ) | 465 | install( FILES part.rc part-viewermode.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/okular ) | ||
455 | 466 | | |||
456 | if (${ECM_VERSION} STRGREATER "5.58.0") | 467 | if (${ECM_VERSION} STRGREATER "5.58.0") | ||
457 | install(FILES okular.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) | 468 | install(FILES okular.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) | ||
458 | else() | 469 | else() | ||
459 | install(FILES okular.categories DESTINATION ${KDE_INSTALL_CONFDIR}) | 470 | install(FILES okular.categories DESTINATION ${KDE_INSTALL_CONFDIR}) | ||
Show All 25 Lines |