Warning, /frameworks/kdnssd/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 set(KF_VERSION "6.0.0") # handled by release scripts 0004 project(KDNSSD VERSION ${KF_VERSION}) 0005 0006 include(FeatureSummary) 0007 find_package(ECM 5.249.0 NO_MODULE) 0008 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") 0009 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) 0010 0011 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules) #TODO: remove cmake/modules when extra-cmake-modules is done 0012 0013 include(KDEInstallDirs) 0014 include(KDECMakeSettings) 0015 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0016 0017 include(KDEGitCommitHooks) 0018 include(ECMPoQmTools) 0019 include(ECMAddQch) 0020 include(ECMGenerateExportHeader) 0021 include(ECMSetupVersion) 0022 include(ECMGenerateHeaders) 0023 include(ECMDeprecationSettings) 0024 include(CMakePackageConfigHelpers) 0025 0026 set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].") 0027 0028 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF) 0029 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") 0030 0031 set(REQUIRED_QT_VERSION 6.5.0) 0032 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Network) 0033 0034 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 0035 0036 set(kdnssd_version_header "${CMAKE_CURRENT_BINARY_DIR}/src/kdnssd_version.h") 0037 ecm_setup_version(PROJECT VARIABLE_PREFIX KDNSSD 0038 VERSION_HEADER "${kdnssd_version_header}" 0039 PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6DNSSDConfigVersion.cmake" 0040 SOVERSION 6) 0041 install(FILES 0042 ${kdnssd_version_header} 0043 DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KDNSSD 0044 COMPONENT Devel 0045 ) 0046 0047 configure_file(config-kdnssd.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdnssd.h ) 0048 0049 0050 find_package(Avahi) 0051 set_package_properties(Avahi PROPERTIES DESCRIPTION "Facilities for service discovery on a local network (DNSSD)" 0052 URL "https://avahi.org" 0053 TYPE OPTIONAL 0054 PURPOSE "Either Avahi or DNSSD is required for KDE applications to make use of multicast DNS/DNS-SD service discovery" 0055 ) 0056 0057 if(NOT AVAHI_FOUND) 0058 find_package(DNSSD) 0059 set_package_properties(DNSSD PROPERTIES DESCRIPTION "Facilities for service discovery on a local network" 0060 URL "https://avahi.org" 0061 TYPE OPTIONAL 0062 PURPOSE "Either Avahi or DNSSD is required for KDE applications to make use of multicast DNS/DNS-SD service discovery" 0063 ) 0064 endif( ) 0065 0066 if(AVAHI_FOUND OR DNSSD_FOUND) 0067 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED DBus) 0068 endif() 0069 0070 ecm_install_po_files_as_qm(poqm) 0071 0072 remove_definitions(-DQT_NO_CAST_FROM_ASCII) 0073 ecm_set_disabled_deprecation_versions( 0074 QT 6.5 0075 ) 0076 0077 add_subdirectory(src) 0078 0079 set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6DNSSD") 0080 0081 if (BUILD_QCH) 0082 ecm_install_qch_export( 0083 TARGETS KF6DNSSD_QCH 0084 FILE KF6DNSSDQchTargets.cmake 0085 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0086 COMPONENT Devel 0087 ) 0088 set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF6DNSSDQchTargets.cmake\")") 0089 endif() 0090 0091 configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF6DNSSDConfig.cmake.in" 0092 "${CMAKE_CURRENT_BINARY_DIR}/KF6DNSSDConfig.cmake" 0093 INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} 0094 ) 0095 0096 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/KF6DNSSDConfig.cmake" 0097 "${CMAKE_CURRENT_BINARY_DIR}/KF6DNSSDConfigVersion.cmake" 0098 DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0099 COMPONENT Devel ) 0100 0101 install(EXPORT KF6DNSSDTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" 0102 FILE KF6DNSSDTargets.cmake NAMESPACE KF6:: COMPONENT Devel) 0103 0104 include(ECMFeatureSummary) 0105 ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 0106 0107 0108 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)