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(Qt5_MIN_VERSION 5.12) 0009 # Use ecm_generate_dbus_service_file + ecm_install_configured_files once bumped to 5.73+ 0010 set(KF5_MIN_VERSION 5.66) 0011 0012 find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED) 0013 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) 0014 0015 include(ECMSetupVersion) 0016 include(ECMGenerateHeaders) 0017 include(CMakePackageConfigHelpers) 0018 include(FeatureSummary) 0019 include(KDEInstallDirs) 0020 include(KDECMakeSettings) 0021 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) 0022 include(ECMQtDeclareLoggingCategory) 0023 include(ECMSetupVersion) 0024 #include(ECMGenerateDBusServiceFile) 0025 #include(ECMConfiguredInstall) 0026 0027 find_package(PkgConfig REQUIRED) 0028 find_package(Qt5 ${Qt5_MIN_VERSION} COMPONENTS Core REQUIRED) 0029 find_package(KF5 ${KF5_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 Qt5::Core KF5::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 # Once KF5 5.73 is required 0069 # 0070 #ecm_generate_dbus_service_file( 0071 # NAME org.kde.KIOFuse 0072 # EXECUTABLE "${KDE_INSTALL_FULL_LIBEXECDIR}/kio-fuse -f" 0073 # SYSTEMD_SERVICE kio-fuse.service 0074 # DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR} 0075 #) 0076 # 0077 #ecm_install_configured_files(INPUT kio-fuse.service.in DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR}) 0078 0079 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KIOFuse.service 0080 "[D-BUS Service] 0081 Name=org.kde.KIOFuse 0082 Exec=${KDE_INSTALL_FULL_LIBEXECDIR}/kio-fuse -f 0083 SystemdService=kio-fuse.service 0084 ") 0085 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KIOFuse.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) 0086 0087 if(CMAKE_SYSTEM_NAME MATCHES "Linux") 0088 # We could argue that this needs a separate "if(LINUX_WITH_SYSTEMD)", 0089 # but the ECM macro (see above) is expected to do the right thing 0090 # when KF5 5.73 is required. 0091 configure_file(kio-fuse.service.in ${CMAKE_CURRENT_BINARY_DIR}/kio-fuse.service) 0092 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kio-fuse.service DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR}) 0093 endif() 0094 0095 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)