Warning, /frameworks/kservice/src/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include(CheckSymbolExists) 0002 include(CheckFunctionExists) 0003 check_function_exists(mmap HAVE_MMAP) 0004 check_symbol_exists(posix_madvise "sys/mman.h" HAVE_MADVISE) 0005 configure_file(config-ksycoca.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ksycoca.h ) 0006 0007 add_library(KF6Service) 0008 add_library(KF6::Service ALIAS KF6Service) 0009 0010 set_target_properties(KF6Service PROPERTIES 0011 VERSION ${KSERVICE_VERSION} 0012 SOVERSION ${KSERVICE_SOVERSION} 0013 EXPORT_NAME Service 0014 ) 0015 0016 target_sources(KF6Service PRIVATE 0017 services/kapplicationtrader.cpp 0018 services/kmimetypefactory.cpp 0019 services/kservice.cpp 0020 services/kserviceaction.cpp 0021 services/kservicefactory.cpp 0022 services/kservicegroup.cpp 0023 services/kservicegroupfactory.cpp 0024 services/kserviceoffer.cpp 0025 sycoca/ksycoca.cpp 0026 sycoca/ksycocadevices.cpp 0027 sycoca/ksycocadict.cpp 0028 sycoca/ksycocaentry.cpp 0029 sycoca/ksycocafactory.cpp 0030 sycoca/kmemfile.cpp 0031 sycoca/kbuildmimetypefactory.cpp 0032 sycoca/kbuildservicefactory.cpp 0033 sycoca/kbuildservicegroupfactory.cpp 0034 sycoca/kbuildsycoca.cpp 0035 sycoca/kctimefactory.cpp 0036 sycoca/kmimeassociations.cpp 0037 sycoca/vfolder_menu.cpp 0038 ) 0039 0040 ecm_qt_declare_logging_category(KF6Service 0041 HEADER servicesdebug.h 0042 IDENTIFIER SERVICES 0043 CATEGORY_NAME kf.service.services 0044 OLD_CATEGORY_NAMES kf5.kservice.services 0045 EXPORT KSERVICE 0046 DESCRIPTION "service (kservice lib)" 0047 ) 0048 ecm_qt_declare_logging_category(KF6Service 0049 HEADER sycocadebug.h 0050 IDENTIFIER SYCOCA 0051 CATEGORY_NAME kf.service.sycoca 0052 OLD_CATEGORY_NAMES kf5.kservice.sycoca 0053 EXPORT KSERVICE 0054 DESCRIPTION "sycoca (kservice)" 0055 ) 0056 0057 ecm_generate_export_header(KF6Service 0058 BASE_NAME KService 0059 GROUP_BASE_NAME KF 0060 VERSION ${KF_VERSION} 0061 USE_VERSION_HEADER 0062 DEPRECATED_BASE_VERSION 0 0063 DEPRECATION_VERSIONS 5.90 0064 EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT} 0065 ) 0066 0067 set(kservice_includes 0068 ${CMAKE_CURRENT_BINARY_DIR}/.. # Since we publicly include kservice_version.h 0069 ${CMAKE_CURRENT_SOURCE_DIR}/services 0070 ${CMAKE_CURRENT_SOURCE_DIR}/sycoca 0071 ) 0072 target_include_directories(KF6Service 0073 PUBLIC 0074 "$<BUILD_INTERFACE:${kservice_includes}>" 0075 INTERFACE 0076 "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KService>" 0077 ) 0078 0079 target_link_libraries(KF6Service 0080 PUBLIC 0081 Qt6::Core 0082 PRIVATE 0083 Qt6::Xml # (for vfolder menu) QDomDocument 0084 KF6::ConfigCore # KConfig and friends 0085 KF6::CoreAddons # KShell 0086 ) 0087 0088 ecm_generate_headers(KService_HEADERS 0089 HEADER_NAMES 0090 KSycoca 0091 KSycocaEntry 0092 KSycocaType 0093 0094 RELATIVE sycoca REQUIRED_HEADERS KService_HEADERS 0095 ) 0096 ecm_generate_headers(KService_HEADERS 0097 HEADER_NAMES 0098 KApplicationTrader 0099 KService 0100 KServiceAction 0101 KServiceGroup 0102 0103 RELATIVE services REQUIRED_HEADERS KService_HEADERS 0104 ) 0105 0106 install(TARGETS KF6Service EXPORT KF6ServiceTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS}) 0107 0108 install(FILES 0109 "${CMAKE_CURRENT_BINARY_DIR}/kservice_export.h" 0110 ${KService_HEADERS} 0111 ${CMAKE_CURRENT_SOURCE_DIR}/services/kserviceconversioncheck_p.h # helper header included by kservice.h 0112 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KService COMPONENT Devel 0113 ) 0114 0115 ecm_qt_install_logging_categories( 0116 EXPORT KSERVICE 0117 FILE kservice.categories 0118 DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} 0119 ) 0120 0121 if(BUILD_QCH) 0122 ecm_add_qch( 0123 KF6Service_QCH 0124 NAME KService 0125 BASE_NAME KF6Service 0126 VERSION ${KF_VERSION} 0127 ORG_DOMAIN org.kde 0128 SOURCES # using only public headers, to cover only public API 0129 ${KService_HEADERS} 0130 MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md" 0131 LINK_QCHS 0132 KF6Config_QCH 0133 KF6CoreAddons_QCH 0134 INCLUDE_DIRS 0135 ${CMAKE_CURRENT_BINARY_DIR} 0136 ${kservice_includes} 0137 BLANK_MACROS 0138 KSERVICE_EXPORT 0139 KSERVICE_DEPRECATED 0140 KSERVICE_DEPRECATED_EXPORT 0141 "KSERVICE_DEPRECATED_VERSION(x, y, t)" 0142 "KSERVICE_DEPRECATED_VERSION_BELATED(x, y, xt, yt, t)" 0143 TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0144 QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR} 0145 COMPONENT Devel 0146 ) 0147 endif() 0148 0149 add_subdirectory(kbuildsycoca) 0150