mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
7cf8483f9a
They renamed the extension from appdata to metainfo long time ago and the right name is "AppStream metadata"
35 lines
1.1 KiB
CMake
35 lines
1.1 KiB
CMake
# This file is part of Telegram Desktop,
|
|
# the official desktop application for the Telegram messaging service.
|
|
#
|
|
# For license and copyright information please follow this link:
|
|
# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
function(generate_appstream_changelog target_name changelog_path metadata_path)
|
|
find_package(Python3 REQUIRED)
|
|
|
|
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
|
|
file(MAKE_DIRECTORY ${gen_dst})
|
|
|
|
set(gen_timestamp ${gen_dst}/${target_name}_appstream_changelog.timestamp)
|
|
set(gen_files ${metadata_path})
|
|
|
|
add_custom_command(
|
|
OUTPUT
|
|
${gen_timestamp}
|
|
COMMAND
|
|
${Python3_EXECUTABLE}
|
|
${submodules_loc}/build/changelog2appstream.py
|
|
-c "${changelog_path}"
|
|
-m "${metadata_path}"
|
|
-n 10
|
|
COMMAND
|
|
echo 1> ${gen_timestamp}
|
|
COMMENT "Generating AppStream changelog (${target_name})"
|
|
DEPENDS
|
|
${submodules_loc}/build/changelog2appstream.py
|
|
${changelog_path}
|
|
${metadata_path}
|
|
)
|
|
generate_target(${target_name} appstream_changelog ${gen_timestamp} "${gen_files}" ${gen_dst})
|
|
endfunction()
|