tdesktop/Telegram/gyp/qt_moc.gypi

32 lines
1.0 KiB
Python

# 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
{
'variables': {
'moc_to_sources%': '0',
},
'rules': [{
'rule_name': 'qt_moc',
'extension': 'h',
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
],
'action': [
'<(qt_loc)/bin/moc<(exe_ext)',
# Silence "Note: No relevant classes found. No output generated."
'--no-notes',
'<!@(python -c "for s in \'<@(_defines)\'.split(\' \'): print(\'-D\' + s)")',
# '<!@(python -c "for s in \'<@(_include_dirs)\'.split(\' \'): print(\'-I\' + s)")',
'<(RULE_INPUT_PATH)',
'-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
],
'message': 'Moc-ing <(RULE_INPUT_ROOT).h..',
'process_outputs_as_sources': '<(moc_to_sources)',
}],
}