diff --git CMakeLists.txt CMakeLists.txt index cceec6c..4e97588 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -59,7 +59,11 @@ target_include_directories(kio-fuse PRIVATE ${FUSE3_INCLUDE_DIRS}) target_compile_definitions(kio-fuse PRIVATE FUSE_USE_VERSION=31 ${FUSE3_CFLAGS_OTHER}) target_link_libraries(kio-fuse PRIVATE Qt5::Core KF5::KIOCore ${FUSE3_LIBRARIES} ${FUSE3_LDFLAGS}) install(TARGETS kio-fuse DESTINATION ${KDE_INSTALL_FULL_LIBEXECDIR}) -install(FILES kio-fuse-tmpfiles.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d) +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + # We could argue that this needs a separate "if(LINUX_WITH_TMPFILES_D)". + # or a "if(LINUX_WITH_SYSTEMD)". + install(FILES kio-fuse-tmpfiles.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d) +endif() # Once KF5 5.73 is required # @@ -80,7 +84,12 @@ SystemdService=kio-fuse.service ") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KIOFuse.service DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) -configure_file(kio-fuse.service.in ${CMAKE_CURRENT_BINARY_DIR}/kio-fuse.service) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kio-fuse.service DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR}) +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + # We could argue that this needs a separate "if(LINUX_WITH_SYSTEMD)", + # but the ECM macro (see above) is expected to do the right thing + # when KF5 5.73 is required. + configure_file(kio-fuse.service.in ${CMAKE_CURRENT_BINARY_DIR}/kio-fuse.service) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kio-fuse.service DESTINATION ${SYSTEMD_USER_UNIT_INSTALL_DIR}) +endif() feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)