init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
This commit is contained in:
32
Telegram/lib_ui/cmake/generate_palette.cmake
Normal file
32
Telegram/lib_ui/cmake/generate_palette.cmake
Normal file
@@ -0,0 +1,32 @@
|
||||
function(generate_palette target_name palette_file)
|
||||
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
|
||||
file(MAKE_DIRECTORY ${gen_dst})
|
||||
|
||||
set(gen_timestamp ${gen_dst}/styles/palette.timestamp)
|
||||
set(gen_files
|
||||
${gen_dst}/styles/palette.cpp
|
||||
${gen_dst}/styles/palette.h
|
||||
)
|
||||
|
||||
set(gen_src ${CMAKE_CURRENT_SOURCE_DIR}/${palette_file})
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${gen_timestamp}
|
||||
BYPRODUCTS
|
||||
${gen_files}
|
||||
COMMAND
|
||||
codegen_style
|
||||
-I${gen_dst}
|
||||
-o${gen_dst}/styles
|
||||
-t${gen_dst}/styles/palette
|
||||
-w${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${gen_src}
|
||||
COMMENT "Generating palette (${target_name})"
|
||||
DEPENDS
|
||||
codegen_style
|
||||
${gen_src}
|
||||
MAIN_DEPENDENCY
|
||||
${gen_src}
|
||||
)
|
||||
generate_target(${target_name} palette ${gen_timestamp} "${gen_files}" ${gen_dst})
|
||||
endfunction()
|
||||
Reference in New Issue
Block a user