1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdevplatform\")
find_package(Qt5WebEngineWidgets CONFIG)
if(TARGET Qt5::WebEngineWidgets)
set_package_properties(Qt5WebEngineWidgets PROPERTIES
PURPOSE "QtWebEngine, for integrated documentation"
URL "https://qt.io/"
TYPE REQUIRED)
else()
find_package(Qt5WebKitWidgets CONFIG)
set_package_properties(Qt5WebKitWidgets PROPERTIES
PURPOSE "QtWebKit, for integrated documentation"
URL "https://qt.io/"
TYPE REQUIRED)
set(USE_QTWEBKIT 1)
endif()
set(KDevPlatformDocumentation_LIB_SRCS
standarddocumentationview.cpp
documentationfindwidget.cpp
documentationview.cpp
)
declare_qt_logging_category(KDevPlatformDocumentation_LIB_SRCS
TYPE LIBRARY
CATEGORY_BASENAME "documentation"
)
ki18n_wrap_ui(KDevPlatformDocumentation_LIB_SRCS documentationfindwidget.ui)
kdevplatform_add_library(KDevPlatformDocumentation SOURCES ${KDevPlatformDocumentation_LIB_SRCS})
target_link_libraries(KDevPlatformDocumentation
PUBLIC
KDev::Interfaces
PRIVATE
KDev::Util
)
if(USE_QTWEBKIT)
target_link_libraries(KDevPlatformDocumentation PRIVATE Qt5::WebKitWidgets)
target_compile_definitions(KDevPlatformDocumentation PUBLIC -DUSE_QTWEBKIT)
else()
target_link_libraries(KDevPlatformDocumentation PRIVATE Qt5::WebEngineWidgets)
endif()
install(FILES
documentationfindwidget.h
standarddocumentationview.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/kdevplatform/documentation COMPONENT Devel
)
|