Warning, /frameworks/kdbusaddons/KF5DBusAddonsMacros.cmake is written in an unsupported language. File is not indexed.
0001 set(_KDBUSADDONSDIR ${CMAKE_CURRENT_LIST_DIR}) 0002 0003 # 0004 # kdbusaddons_generate_dbus_service_file(EXECUTABLE NAME PATH) 0005 # 0006 # This function generates a D-Bus service file and installs it 0007 # into the specified destination. 0008 # 0009 # On Windows the path is not used because D-Bus service executables 0010 # are always installed in the same directory as dbus-daemon. 0011 # 0012 # Parameters: 0013 # 0014 # EXECUTABLE - name of the executable 0015 # NAME - service path in D-Bus 0016 # PATH - path to install the service file 0017 # 0018 # Example: 0019 # 0020 # kdbusaddons_generate_dbus_service_file(kded5 org.kde.kded5 ${KDE_INSTALL_FULL_BINDIR}) 0021 # 0022 # Since 5.42.0 0023 0024 function(KDBUSADDONS_GENERATE_DBUS_SERVICE_FILE _executable _name _path) 0025 set(_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}.service) 0026 set(_template ${_KDBUSADDONSDIR}/KF5dbus.service.in) 0027 set(NAME ${_name}) 0028 if(WIN32) 0029 set(EXEC ${_executable}) 0030 else() 0031 if(IS_ABSOLUTE ${_path}) 0032 set(EXEC ${_path}/${_executable}) 0033 else() 0034 message(FATAL_ERROR "Path ${_path} is not absolute") 0035 endif() 0036 endif() 0037 if(NOT EXISTS ${_file}) 0038 message(STATUS "generating ${_file} from ${_template}") 0039 endif() 0040 configure_file(${_template} ${_file}) 0041 install(FILES ${_file} DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}) 0042 endfunction()