tdesktop/Telegram/cmake/generate_appdata_changelog....

35 lines
1.1 KiB
CMake
Raw Normal View History

2020-11-19 20:21:05 +00:00
# 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_appdata_changelog target_name changelog_path appdata_path)
find_package(Python3 REQUIRED)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
set(gen_timestamp ${gen_dst}/${target_name}_changelog.timestamp)
set(gen_files ${appdata_path})
add_custom_command(
OUTPUT
${gen_timestamp}
BYPRODUCTS
${gen_files}
COMMAND
2020-11-19 20:21:05 +00:00
${Python3_EXECUTABLE}
${submodules_loc}/build/changelog2appdata.py
-c "${changelog_path}"
-a "${appdata_path}"
-n 10
COMMAND
echo 1> ${gen_timestamp}
2020-11-19 20:21:05 +00:00
COMMENT "Generating AppData changelog (${target_name})"
DEPENDS
${submodules_loc}/build/changelog2appdata.py
${changelog_path}
${appdata_path}
)
generate_target(${target_name} changelog ${gen_timestamp} "${gen_files}" ${gen_dst})
2020-11-19 20:21:05 +00:00
endfunction()