Warning, /frameworks/kconfigwidgets/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 add_library(KF5ConfigWidgets)
0002 add_library(KF5::ConfigWidgets ALIAS KF5ConfigWidgets)
0003 
0004 target_sources(KF5ConfigWidgets PRIVATE
0005   kcodecaction.cpp
0006   kcolorscheme.cpp
0007   kcolorschememanager.cpp
0008   kcolorschememenu.cpp
0009   kcolorschememodel.cpp
0010   kcommandbar.cpp
0011   kcommandbarmodel_p.cpp
0012   kconfigdialog.cpp
0013   kconfigviewstatesaver.cpp
0014   kconfigdialogmanager.cpp
0015   kcmodule.cpp
0016   khelpclient.cpp
0017   khamburgermenu.cpp
0018   khamburgermenuhelpers.cpp
0019   klanguagebutton.cpp
0020   klanguagename.cpp
0021   krecentfilesaction.cpp
0022   kstandardaction.cpp
0023   kstatefulbrush.cpp
0024   ktipdialog.cpp
0025 
0026   kcodecaction.h
0027   kcolorscheme.h
0028   kcolorschememanager.h
0029   kcolorschememenu.cpp
0030   kcommandbar.h
0031   kcommandbarmodel_p.h
0032   kconfigdialog.h
0033   kconfigviewstatesaver.h
0034   kconfigdialogmanager.h
0035   kcmodule.h
0036   khelpclient.h
0037   khamburgermenu.h
0038   khamburgermenuhelpers_p.h
0039   klanguagebutton.h
0040   klanguagename.h
0041   krecentfilesaction.h
0042   kstandardaction.h
0043   kstatefulbrush.h
0044   ktipdialog.h
0045 
0046   kconfigwidgets.qrc
0047 )
0048 
0049 ecm_qt_declare_logging_category(KF5ConfigWidgets
0050     HEADER kconfigwidgets_debug.h
0051     IDENTIFIER KCONFIG_WIDGETS_LOG
0052     CATEGORY_NAME kf.configwidgets
0053     OLD_CATEGORY_NAMES kf5.kconfigwidgets
0054     DESCRIPTION "KConfigWidgets"
0055     EXPORT KCONFIGWIDGETS
0056 )
0057 if (TARGET Qt${QT_MAJOR_VERSION}::DBus)
0058     target_sources(KF5ConfigWidgets PRIVATE kpastetextaction.cpp)
0059 endif()
0060 
0061 if (WITH_KAUTH)
0062     set(WITH_KAUTH_DEFINE_VALUE 1)
0063 else()
0064     set(WITH_KAUTH_DEFINE_VALUE 0)
0065 endif()
0066 set(define_with_kauth_code "#define KCONFIGWIDGETS_WITH_KAUTH ${WITH_KAUTH_DEFINE_VALUE}\n")
0067 
0068 ecm_generate_export_header(KF5ConfigWidgets
0069     BASE_NAME KConfigWidgets
0070     GROUP_BASE_NAME KF
0071     VERSION ${KF_VERSION}
0072     DEPRECATED_BASE_VERSION 0
0073     DEPRECATION_VERSIONS 4.0 5.0 5.23 5.32 5.38 5.39 5.64 5.78 5.80 5.82 5.83 5.84 5.85 5.90 5.93 5.102 5.103 5.106 5.107
0074     EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
0075     CUSTOM_CONTENT_FROM_VARIABLE define_with_kauth_code
0076 )
0077 
0078 target_include_directories(KF5ConfigWidgets INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KConfigWidgets>")
0079 
0080 target_link_libraries(KF5ConfigWidgets
0081   PUBLIC
0082     KF5::WidgetsAddons # For K*Action, KPage*, KViewStateSerializer, KAcceleratorManager, K*GuiItem
0083     KF5::ConfigGui # KStandardAction uses KStandardShortcut
0084     KF5::CoreAddons # KCModule uses KAboutData and KPluginMetaData
0085   PRIVATE
0086     KF5::GuiAddons # KColorScheme uses KColorUtils
0087     KF5::I18n # For action and widget texts
0088 )
0089 
0090 if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND
0091    EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.102.0)
0092     target_link_libraries(KF5ConfigWidgets
0093       PUBLIC
0094       KF5::Codecs # KCodecActions uses KCharsets, KEncodingProber
0095     )
0096 else()
0097     target_link_libraries(KF5ConfigWidgets
0098       PRIVATE
0099       KF5::Codecs # KCodecActions uses KCharsets, KEncodingProber
0100     )
0101 endif()
0102 
0103 if (WITH_KAUTH)
0104   if (QT_MAJOR_VERSION STREQUAL "6")
0105     target_link_libraries(KF5ConfigWidgets PUBLIC KF5::AuthCore)
0106   else()
0107     target_link_libraries(KF5ConfigWidgets PUBLIC KF5::Auth)
0108   endif()
0109 endif()
0110 
0111 if (TARGET Qt${QT_MAJOR_VERSION}::DBus)
0112   target_link_libraries(KF5ConfigWidgets PRIVATE Qt${QT_MAJOR_VERSION}::DBus) # KPasteTextAction talks to Klipper via DBus
0113 endif()
0114 
0115 if (TARGET Qt6::Core5Compat)
0116     target_link_libraries(KF5ConfigWidgets PUBLIC Qt6::Core5Compat)
0117 endif()
0118 
0119 set_target_properties(KF5ConfigWidgets PROPERTIES VERSION   ${KCONFIGWIDGETS_VERSION}
0120                                                   SOVERSION ${KCONFIGWIDGETS_SOVERSION}
0121                                                   EXPORT_NAME ConfigWidgets
0122 )
0123 
0124 ecm_generate_headers(KConfigWidgets_HEADERS
0125   HEADER_NAMES
0126   KCodecAction
0127   KColorScheme
0128   KColorSchemeManager
0129   KColorSchemeMenu
0130   KColorSchemeModel
0131   KCommandBar
0132   KConfigDialog
0133   KConfigViewStateSaver
0134   KConfigDialogManager
0135   KCModule
0136   KHamburgerMenu
0137   KHelpClient
0138   KLanguageButton
0139   KLanguageName
0140   KPasteTextAction
0141   KRecentFilesAction
0142   KStatefulBrush
0143   KViewStateMaintainer
0144   KStandardAction
0145   KTipDialog
0146 
0147   REQUIRED_HEADERS KConfigWidgets_HEADERS
0148 )
0149 
0150 install(TARGETS KF5ConfigWidgets EXPORT KF5ConfigWidgetsTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0151 
0152 install(FILES
0153   ${CMAKE_CURRENT_BINARY_DIR}/kconfigwidgets_export.h
0154   ${KConfigWidgets_HEADERS}
0155   ktip.h
0156   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KConfigWidgets COMPONENT Devel
0157 )
0158 
0159 install(PROGRAMS preparetips5 DESTINATION ${KDE_INSTALL_BINDIR} )
0160 install( FILES entry.desktop  DESTINATION  ${KDE_INSTALL_LOCALEDIR}/en_US RENAME kf5_entry.desktop )
0161 
0162 ecm_qt_install_logging_categories(
0163     EXPORT KCONFIGWIDGETS
0164     FILE kconfigwidgets.categories
0165     DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0166 )
0167 
0168 if(BUILD_DESIGNERPLUGIN)
0169     add_subdirectory(designer)
0170 endif()
0171 
0172 if(BUILD_QCH)
0173     ecm_add_qch(
0174         KF5ConfigWidgets_QCH
0175         NAME KConfigWidgets
0176         BASE_NAME KF5ConfigWidgets
0177         VERSION ${KF_VERSION}
0178         ORG_DOMAIN org.kde
0179         SOURCES # using only public headers, to cover only public API
0180             ${KConfigWidgets_HEADERS}
0181         MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
0182         IMAGE_DIRS "${CMAKE_SOURCE_DIR}/docs/pics"
0183         LINK_QCHS
0184             KF5Codecs_QCH
0185             KF5WidgetsAddons_QCH
0186             KF5Config_QCH
0187             KF5Auth_QCH
0188         INCLUDE_DIRS
0189             ${CMAKE_CURRENT_BINARY_DIR}
0190         BLANK_MACROS
0191             KCONFIGWIDGETS_EXPORT
0192             KCONFIGWIDGETS_DEPRECATED
0193             KCONFIGWIDGETS_DEPRECATED_EXPORT
0194             "KCONFIGWIDGETS_DEPRECATED_VERSION(x, y, t)"
0195             "KCONFIGWIDGETS_DEPRECATED_VERSION_BELATED(x, y, xt, yt, t)"
0196             "KCONFIGWIDGETS_ENUMERATOR_DEPRECATED_VERSION(x, y, t)"
0197             "KCONFIGWIDGETS_ENUMERATOR_DEPRECATED_VERSION_BELATED(x, y, xt, yt, t)"
0198         PREDEFINED_MACROS
0199             "KCONFIGWIDGETS_ENABLE_DEPRECATED_SINCE(x, y)=1"
0200             "KCONFIGWIDGETS_BUILD_DEPRECATED_SINCE(x, y)=1"
0201         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0202         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0203         COMPONENT Devel
0204     )
0205 endif()
0206 
0207 include(ECMGeneratePriFile)
0208 ecm_generate_pri_file(BASE_NAME KConfigWidgets LIB_NAME KF5ConfigWidgets DEPS "KCodecs KWidgetsAddons KConfigGui KAuth" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KConfigWidgets)
0209 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})