Warning, /system/kio-fuse/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 project(kio-fuse VERSION 5.0.0)
0004 
0005 set(CMAKE_CXX_STANDARD 17)
0006 set(CMAKE_CXX_STANDARD_REQUIRED ON)
0007 
0008 set(QT_MIN_VERSION 5.15)
0009 set(KF_MIN_VERSION 5.96)
0010 
0011 find_package(ECM ${KF_MIN_VERSION} CONFIG REQUIRED)
0012 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
0013 
0014 include(QtVersionOption)
0015 include(ECMSetupVersion)
0016 include(ECMGenerateHeaders)
0017 include(CMakePackageConfigHelpers)
0018 include(FeatureSummary)
0019 include(KDEInstallDirs)
0020 include(KDECMakeSettings)
0021 include(KDECompilerSettings NO_POLICY_SCOPE)
0022 include(ECMQtDeclareLoggingCategory)
0023 include(ECMSetupVersion)
0024 include(ECMGenerateDBusServiceFile)
0025 include(ECMConfiguredInstall)
0026 
0027 find_package(PkgConfig REQUIRED)
0028 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} COMPONENTS Core REQUIRED)
0029 find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS
0030         CoreAddons
0031         KIO
0032 )
0033 pkg_check_modules(FUSE3 REQUIRED fuse3)
0034 
0035 if(BUILD_TESTING)
0036         add_subdirectory(tests)
0037 endif()
0038 
0039 set(KIOFUSE_SOURCES
0040         main.cpp
0041         kiofusevfs.cpp
0042         kiofusevfs.h
0043         kiofuseservice.cpp
0044         kiofuseservice.h
0045         kiofusenode.h)
0046 
0047 ecm_setup_version(PROJECT
0048         VARIABLE_PREFIX KIOFUSE
0049         VERSION_HEADER kiofuseversion.h)
0050 
0051 ecm_qt_declare_logging_category(KIOFUSE_SOURCES
0052         HEADER debug.h
0053         IDENTIFIER KIOFUSE_LOG
0054         CATEGORY_NAME org.kde.kio.fuse
0055         DEFAULT_SEVERITY Warning)
0056 
0057 add_executable(kio-fuse ${KIOFUSE_SOURCES})
0058 target_include_directories(kio-fuse PRIVATE ${FUSE3_INCLUDE_DIRS})
0059 target_compile_definitions(kio-fuse PRIVATE FUSE_USE_VERSION=31 ${FUSE3_CFLAGS_OTHER})
0060 target_link_libraries(kio-fuse PRIVATE Qt::Core KF${QT_MAJOR_VERSION}::KIOCore ${FUSE3_LIBRARIES} ${FUSE3_LDFLAGS})
0061 install(TARGETS kio-fuse DESTINATION ${KDE_INSTALL_FULL_LIBEXECDIR})
0062 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
0063         # We could argue that this needs a separate "if(LINUX_WITH_TMPFILES_D)".
0064         # or a "if(LINUX_WITH_SYSTEMD)".
0065         install(FILES kio-fuse-tmpfiles.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d)
0066 endif()
0067 
0068 ecm_generate_dbus_service_file(
0069    NAME org.kde.KIOFuse
0070    EXECUTABLE "${KDE_INSTALL_FULL_LIBEXECDIR}/kio-fuse -f"
0071    SYSTEMD_SERVICE kio-fuse.service
0072    DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
0073 )
0074 
0075 if(DEFINED KDE_INSTALL_SYSTEMDUSERUNITDIR)
0076         ecm_install_configured_files(INPUT kio-fuse.service.in DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
0077 else()
0078         ecm_install_configured_files(INPUT kio-fuse.service.in DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR})
0079 endif()
0080 
0081 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)