File: generate_target.cmake

package info (click to toggle)
telegram-desktop 2.6.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 40,024 kB
  • sloc: cpp: 411,999; xml: 34,087; python: 2,199; sh: 1,103; ansic: 861; objc: 258; javascript: 174; makefile: 46
file content (14 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL

function(generate_target parent_name postfix generated_timestamp generated_files gen_dst)
    add_custom_target(${parent_name}_${postfix} DEPENDS ${generated_timestamp})
    init_target_folder(${parent_name}_${postfix} "(gen)")
    add_dependencies(${parent_name} ${parent_name}_${postfix})
    target_sources(${parent_name} PRIVATE ${generated_files})
    target_include_directories(${parent_name} PUBLIC ${gen_dst})
    source_group("(gen)" FILES ${generated_files})
endfunction()