blob: d6028880cef2cbee676a7e509404bee78234d99a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# 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_numbers target_name numbers_file)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
file(MAKE_DIRECTORY ${gen_dst})
set(gen_timestamp ${gen_dst}/numbers.timestamp)
set(gen_files
${gen_dst}/numbers.cpp
${gen_dst}/numbers.h
)
add_custom_command(
OUTPUT
${gen_timestamp}
BYPRODUCTS
${gen_files}
COMMAND
codegen_numbers
-o${gen_dst}
${numbers_file}
COMMENT "Generating numbers (${target_name})"
DEPENDS
codegen_numbers
${numbers_file}
)
generate_target(${target_name} numbers ${gen_timestamp} "${gen_files}" ${gen_dst})
endfunction()
|