2019-11-21 11:56:17 +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
|
|
|
|
|
2019-11-08 11:08:40 +00:00
|
|
|
function(generate_numbers target_name numbers_file)
|
|
|
|
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
|
2019-11-25 15:40:59 +00:00
|
|
|
file(MAKE_DIRECTORY ${gen_dst})
|
|
|
|
|
2019-12-03 16:11:03 +00:00
|
|
|
set(gen_timestamp ${gen_dst}/numbers.timestamp)
|
|
|
|
set(gen_files
|
2019-11-08 11:08:40 +00:00
|
|
|
${gen_dst}/numbers.cpp
|
|
|
|
${gen_dst}/numbers.h
|
|
|
|
)
|
2019-12-03 16:11:03 +00:00
|
|
|
|
2019-11-08 11:08:40 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT
|
2019-12-03 16:11:03 +00:00
|
|
|
${gen_timestamp}
|
2019-11-28 08:42:57 +00:00
|
|
|
BYPRODUCTS
|
2019-12-03 16:11:03 +00:00
|
|
|
${gen_files}
|
2019-11-08 11:08:40 +00:00
|
|
|
COMMAND
|
|
|
|
codegen_numbers
|
|
|
|
-o${gen_dst}
|
|
|
|
${numbers_file}
|
|
|
|
COMMENT "Generating numbers (${target_name})"
|
|
|
|
DEPENDS
|
|
|
|
codegen_numbers
|
2019-11-22 18:02:59 +00:00
|
|
|
${numbers_file}
|
2019-11-08 11:08:40 +00:00
|
|
|
)
|
2019-12-03 16:11:03 +00:00
|
|
|
generate_target(${target_name} numbers ${gen_timestamp} "${gen_files}" ${gen_dst})
|
2019-11-08 11:08:40 +00:00
|
|
|
endfunction()
|