Warning, /utilities/kfloppy/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 # KDE Application Version, managed by release script
0004 set (RELEASE_SERVICE_VERSION_MAJOR "22")
0005 set (RELEASE_SERVICE_VERSION_MINOR "11")
0006 set (RELEASE_SERVICE_VERSION_MICRO "70")
0007 set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0008 
0009 project(kfloppy VERSION ${RELEASE_SERVICE_VERSION})
0010 
0011 if(NOT UNIX)
0012   message(FATAL_ERROR "KFloppy is only supposed to be built on Unix platforms.")
0013 endif(NOT UNIX)
0014 
0015 set(KF5_MIN_VERSION "5.91.0")
0016 set(REQUIRED_QT_VERSION "5.15.2")
0017 
0018 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0019 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0020 
0021 include(KDEInstallDirs)
0022 include(KDECompilerSettings NO_POLICY_SCOPE)
0023 include(KDECMakeSettings)
0024 include(FeatureSummary)
0025 include(ECMInstallIcons)
0026 include(ECMQtDeclareLoggingCategory)
0027 include(KDEGitCommitHooks)
0028 include(KDEClangFormat)
0029 include(ECMDeprecationSettings)
0030 file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h *.c)
0031 kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
0032 
0033 
0034 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core DBus Widgets)
0035 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n CoreAddons Completion XmlGui)
0036 find_package(KF5DocTools ${KF5_MIN_VERSION})
0037 set_package_properties(KF5DocTools PROPERTIES DESCRIPTION
0038     "Tools to generate documentation"
0039     TYPE OPTIONAL
0040 )
0041 find_package(KF5Crash ${KF5_MIN_VERSION} CONFIG REQUIRED)
0042 
0043 ecm_set_disabled_deprecation_versions(QT 5.15.2
0044     KF 5.91
0045 )
0046 
0047 
0048 add_executable(kfloppy)
0049 target_sources(kfloppy PRIVATE main.cpp format.cpp floppy.cpp )
0050 
0051 set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS "KFLOPPY_VERSION=\"${RELEASE_SERVICE_VERSION}\"")
0052 
0053 ecm_qt_declare_logging_category(kfloppy HEADER kfloppy_debug.h IDENTIFIER KFLOPPY_LOG CATEGORY_NAME org.kde.kfloppy DESCRIPTION "KFloppy" EXPORT KFLOPPY)
0054 
0055 
0056 target_link_libraries(kfloppy KF5::CoreAddons KF5::I18n KF5::Completion KF5::XmlGui Qt${QT_MAJOR_VERSION}::DBus KF5::Crash)
0057 
0058 install(TARGETS kfloppy  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
0059 
0060 
0061 ########### install files ###############
0062 
0063 install(PROGRAMS org.kde.kfloppy.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
0064 install(FILES org.kde.kfloppy.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0065 
0066 # The mimetypes used in this servicemenu (e.g. floppy_unmounted) don't exist anymore.
0067 # This needs to be done differently.
0068 #install( FILES floppy_format.desktop  DESTINATION ${KDE_INSTALL_KSERVICES5DIR}/ServiceMenus)
0069 
0070 ecm_install_icons(ICONS
0071     128-apps-kfloppy.png
0072     16-apps-kfloppy.png
0073     22-apps-kfloppy.png
0074     32-apps-kfloppy.png
0075     48-apps-kfloppy.png
0076     64-apps-kfloppy.png
0077     DESTINATION ${KDE_INSTALL_ICONDIR}
0078     THEME hicolor
0079 )
0080 
0081 ecm_qt_install_logging_categories(
0082         EXPORT KFLOPPY
0083         FILE kfloppy.categories
0084         DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
0085         )
0086 ki18n_install(po)
0087 if (KF5DocTools_FOUND)
0088     kdoctools_install(po)
0089     add_subdirectory(doc)
0090 endif()
0091 
0092 
0093 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
0094 kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)