Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/documentation/CMakeLists.txt
1 | add_definitions(-DTRANSLATION_DOMAIN=\"kdevplatform\") | 1 | add_definitions(-DTRANSLATION_DOMAIN=\"kdevplatform\") | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | # store KDEVELOP_USE_QTEXTBROWSER in the cache because it needs to be accessible | ||||
4 | # to plugins/qthelp/CMakeLists.txt too. Reset it to 0 on each run. | ||||
5 | set(KDEVELOP_USE_QTEXTBROWSER 0 CACHE INTERNAL "Documentation will be rendered using QTextBrowser") | ||||
6 | | ||||
3 | find_package(Qt5WebEngineWidgets CONFIG) | 7 | find_package(Qt5WebEngineWidgets CONFIG) | ||
4 | if(TARGET Qt5::WebEngineWidgets) | 8 | if(TARGET Qt5::WebEngineWidgets) | ||
5 | set_package_properties(Qt5WebEngineWidgets PROPERTIES | 9 | set_package_properties(Qt5WebEngineWidgets PROPERTIES | ||
Context not available. | |||||
8 | TYPE REQUIRED) | 12 | TYPE REQUIRED) | ||
9 | else() | 13 | else() | ||
10 | find_package(Qt5WebKitWidgets CONFIG) | 14 | find_package(Qt5WebKitWidgets CONFIG) | ||
11 | set_package_properties(Qt5WebKitWidgets PROPERTIES | 15 | if(TARGET Qt5::WebKitWidgets) | ||
12 | PURPOSE "QtWebKit, for integrated documentation" | 16 | set_package_properties(Qt5WebKitWidgets PROPERTIES | ||
13 | URL "http://qt-project.org/" | 17 | PURPOSE "QtWebKit, for integrated documentation" | ||
14 | TYPE REQUIRED) | 18 | URL "http://qt-project.org/" | ||
15 | set(USE_QTWEBKIT 1) | 19 | TYPE REQUIRED) | ||
20 | set(USE_QTWEBKIT 1) | ||||
21 | else() | ||||
22 | set(KDEVELOP_USE_QTEXTBROWSER 1 CACHE INTERNAL "Documentation will be rendered using QTextBrowser") | ||||
23 | endif() | ||||
16 | endif() | 24 | endif() | ||
17 | 25 | | |||
18 | set(KDevPlatformDocumentation_LIB_SRCS | 26 | if(KDEVELOP_USE_QTEXTBROWSER) | ||
27 | set(KDevPlatformDocumentation_LIB_SRCS | ||||
28 | standarddocumentationview_qtb.cpp) | ||||
29 | endif() | ||||
30 | set(KDevPlatformDocumentation_LIB_SRCS ${KDevPlatformDocumentation_LIB_SRCS} | ||||
19 | standarddocumentationview.cpp | 31 | standarddocumentationview.cpp | ||
20 | documentationfindwidget.cpp | 32 | documentationfindwidget.cpp | ||
21 | documentationview.cpp | 33 | documentationview.cpp | ||
Context not available. | |||||
30 | ki18n_wrap_ui(KDevPlatformDocumentation_LIB_SRCS documentationfindwidget.ui) | 42 | ki18n_wrap_ui(KDevPlatformDocumentation_LIB_SRCS documentationfindwidget.ui) | ||
31 | kdevplatform_add_library(KDevPlatformDocumentation SOURCES ${KDevPlatformDocumentation_LIB_SRCS}) | 43 | kdevplatform_add_library(KDevPlatformDocumentation SOURCES ${KDevPlatformDocumentation_LIB_SRCS}) | ||
32 | 44 | | |||
33 | target_link_libraries(KDevPlatformDocumentation PUBLIC KDev::Interfaces PRIVATE KDev::Util) | 45 | target_link_libraries(KDevPlatformDocumentation PUBLIC KDev::Interfaces PRIVATE KDev::Util KDev::Sublime) | ||
34 | 46 | | |||
35 | if(USE_QTWEBKIT) | 47 | if(KDEVELOP_USE_QTEXTBROWSER) | ||
48 | target_link_libraries(KDevPlatformDocumentation PRIVATE Qt5::Widgets) | ||||
49 | target_compile_definitions(KDevPlatformDocumentation PRIVATE -DUSE_QTEXTBROWSER) | ||||
50 | elseif(USE_QTWEBKIT) | ||||
36 | target_link_libraries(KDevPlatformDocumentation PRIVATE Qt5::WebKitWidgets) | 51 | target_link_libraries(KDevPlatformDocumentation PRIVATE Qt5::WebKitWidgets) | ||
37 | target_compile_definitions(KDevPlatformDocumentation PRIVATE -DUSE_QTWEBKIT) | 52 | target_compile_definitions(KDevPlatformDocumentation PRIVATE -DUSE_QTWEBKIT) | ||
38 | else() | 53 | else() | ||
Context not available. |