Avoid redundant definition of appstream file path

This commit is contained in:
Martchus 2022-08-22 21:47:08 +02:00
parent 9141fcdfd8
commit 70e6ef4b7b
1 changed files with 5 additions and 2 deletions

View File

@ -270,11 +270,14 @@ function (add_desktop_file)
# add indentation of two additional spaces
string(REGEX REPLACE "\n([^$])" "\n \\1" META_APP_APPDATA_BODY "${META_APP_APPDATA_BODY}")
endif ()
# create appstream desktop file from template
configure_file("${APP_APPSTREAM_TEMPLATE_FILE}" "${CMAKE_CURRENT_BINARY_DIR}/resources/${META_ID}.appdata.xml" @ONLY)
set(APPSTREAM_FILE "${CMAKE_CURRENT_BINARY_DIR}/resources/${META_ID}.appdata.xml")
configure_file("${APP_APPSTREAM_TEMPLATE_FILE}" "${APPSTREAM_FILE}" @ONLY)
# add install for the appstream file
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/resources/${META_ID}.appdata.xml"
FILES "${APPSTREAM_FILE}"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo"
COMPONENT appimage)
endfunction ()