Warning, /frameworks/plasma-framework/KF5PlasmaMacros.cmake is written in an unsupported language. File is not indexed.
0001 # To not mess up the ECM_FIND_VERSION we only include ECM if the required variables are not set 0002 if (NOT KDE_INSTALL_KSERVICESDIR) 0003 find_package(ECM 5.83.0 CONFIG REQUIRED) 0004 include(${ECM_KDE_MODULE_DIR}/KDEInstallDirs.cmake) 0005 endif() 0006 0007 set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma") 0008 set(PLASMA_DATA_INSTALL_DIR "${KDE_INSTALL_DATADIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}") 0009 0010 # plasma_install_package(path componentname [root] [type]) 0011 # 0012 # Use plasma_install_bundled_package instead. 0013 # Installs a Plasma package to the system path 0014 # @arg path The source path to install from, location of metadata.desktop 0015 # @arg componentname The plugin name of the component, corresponding to the 0016 # X-KDE-PluginInfo-Name key in metadata.desktop 0017 # @arg root The subdirectory to install to, default: plasmoids 0018 # @arg type The type, default to applet, or applet, package, containment, 0019 # wallpaper, shell, lookandfeel, etc. 0020 # @see Types column in kpackagetool5 --list-types 0021 # 0022 # Examples: 0023 # plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet 0024 # plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package 0025 # 0026 macro(plasma_install_package dir component) 0027 set(root ${ARGV2}) 0028 set(type ${ARGV3}) 0029 if(NOT root) 0030 set(root plasmoids) 0031 endif() 0032 if(NOT type) 0033 set(type applet) 0034 endif() 0035 0036 kpackage_install_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR} NO_DEPRECATED_WARNING) 0037 0038 # TODO KF6 Remove 0039 get_filename_component(metadata_desktop_file_absolute_path ${dir}/metadata.desktop REALPATH) 0040 if (EXISTS ${metadata_desktop_file_absolute_path}) 0041 install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} RENAME plasma-${type}-${component}.desktop) 0042 endif() 0043 endmacro() 0044 0045 0046 # plasma_install_bundled_package(path componentname [root] [type]) 0047 # 0048 # Installs a Plasma package to the system path, 0049 # compressing all its files in a binary rcc qresources file. 0050 # @arg path The source path to install from, location of metadata.desktop 0051 # @arg componentname The plugin name of the component, corresponding to the 0052 # X-KDE-PluginInfo-Name key in metadata.desktop 0053 # @arg root The subdirectory to install to, default: plasmoids 0054 # @arg type The type, default to applet, or applet, package, containment, 0055 # wallpaper, shell, lookandfeel, etc. 0056 # @see Types column in kpackagetool5 --list-types 0057 # 0058 # Examples: 0059 # plasma_install_bundled_package(mywidget org.kde.plasma.mywidget) # installs an applet 0060 # plasma_install_bundled_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package 0061 # 0062 macro(plasma_install_bundled_package dir component) 0063 set(root ${ARGV2}) 0064 set(type ${ARGV3}) 0065 if(NOT root) 0066 set(root plasmoids) 0067 endif() 0068 if(NOT type) 0069 set(type applet) 0070 endif() 0071 0072 kpackage_install_bundled_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR}) 0073 0074 # TODO KF6 Remove 0075 get_filename_component(metadata_desktop_file_absolute_path ${dir}/metadata.desktop REALPATH) 0076 if (EXISTS ${metadata_desktop_file_absolute_path}) 0077 install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICESDIR} RENAME plasma-${type}-${component}.desktop) 0078 endif() 0079 endmacro() 0080 0081 0082 # plasma_add_plugin(pluginname sources_SRC) 0083 # 0084 # Use instead of add_library. Replacement for kde4_add_plugin 0085 # Basically does add_library and removes the prefix of the library 0086 # 0087 # @arg pluginname The name of the plugin, 0088 # @arg sources_SRC The source files to be built 0089 # 0090 # Example: 0091 # plasma_add_plugin(plasma_engine_statusnotifieritem ${statusnotifieritem_engine_SRCS}) 0092 # 0093 macro(plasma_add_plugin plugin) 0094 message(WARNING "plasma_add_plugin() is deprecated, use add_library(MODULE) instead. You can use the porting scripts in plasma-framework/tools") 0095 set(plugin_sources ${ARGN} ) 0096 add_library(${plugin} MODULE ${plugin_sources} ) 0097 set_target_properties(${plugin} PROPERTIES PREFIX "") 0098 endmacro() 0099