Allow adding 'GenericName' in *.desktop file

experiment/meta_header
Martchus 6 years ago
parent e8b3f72f50
commit e09386f6ed

@ -112,6 +112,7 @@ find_template_file("desktop" CPP_UTILITIES APP_DESKTOP_TEMPLATE_FILE)
function(add_custom_desktop_file_with_additional_entries
FILE_NAME
DESKTOP_FILE_APP_NAME
DESKTOP_FILE_GENERIC_NAME
DESKTOP_FILE_DESCRIPTION
DESKTOP_FILE_CATEGORIES
DESKTOP_FILE_CMD
@ -134,6 +135,7 @@ endfunction()
function(add_custom_desktop_file
FILE_NAME
DESKTOP_FILE_APP_NAME
DESKTOP_FILE_GENERIC_NAME
DESKTOP_FILE_DESCRIPTION
DESKTOP_FILE_CATEGORIES
DESKTOP_FILE_CMD
@ -141,6 +143,7 @@ function(add_custom_desktop_file
add_custom_desktop_file_with_additional_entries(
"${FILE_NAME}"
"${DESKTOP_FILE_APP_NAME}"
"${DESKTOP_FILE_GENERIC_NAME}"
"${DESKTOP_FILE_DESCRIPTION}"
"${DESKTOP_FILE_CATEGORIES}"
"${DESKTOP_FILE_CMD}"
@ -164,6 +167,7 @@ function(add_desktop_file)
add_custom_desktop_file_with_additional_entries(
"${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}"
"${META_APP_NAME}"
"${META_GENERIC_NAME}"
"${META_APP_DESCRIPTION}"
"${META_APP_CATEGORIES}"
"${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}"

@ -6,12 +6,17 @@ project(${META_PROJECT_NAME})
# set META_PROJECT_VARNAME and META_PROJECT_VARNAME_UPPER if not specified explicitely
if(NOT META_PROJECT_VARNAME)
set(META_PROJECT_VARNAME ${META_PROJECT_NAME})
set(META_PROJECT_VARNAME "${META_PROJECT_NAME}")
endif()
if(NOT META_PROJECT_VARNAME_UPPER)
string(TOUPPER ${META_PROJECT_VARNAME} META_PROJECT_VARNAME_UPPER)
endif()
# set META_GENERIC_NAME to META_APP_NAME if not specified explicitely
if(NOT META_GENERIC_NAME)
set(META_GENERIC_NAME "${META_APP_NAME}")
endif()
# provide variables for other projects built as part of the same subdirs project
# to access files from this project
get_directory_property(HAS_PARENT PARENT_DIRECTORY)

@ -1,5 +1,6 @@
[Desktop Entry]
Name=@DESKTOP_FILE_APP_NAME@
GenericName=@DESKTOP_FILE_GENERIC_NAME@
Comment=@DESKTOP_FILE_DESCRIPTION@
Exec=@DESKTOP_FILE_CMD@
Icon=@DESKTOP_FILE_ICON@

Loading…
Cancel
Save