Add rule file for qrc.

This commit is contained in:
John Preston 2019-09-17 18:39:47 +03:00
parent 85c83003ca
commit 9c711cca1a

44
gyp/qrc_rule.gypi Normal file
View file

@ -0,0 +1,44 @@
# 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
{
'actions': [{
'action_name': 'update_dependent_qrc',
'inputs': [
'update_dependent.py',
'<@(qrc_files)',
'<!@(python <(submodules_loc)/lib_ui/gyp/update_dependent.py --qrc_list <@(qrc_files))',
],
'outputs': [
'<(qrc_timestamp)',
],
'action': [
'python', '<(submodules_loc)/lib_ui/gyp/update_dependent.py', '--qrc',
'-o', '<(qrc_timestamp)',
'<@(qrc_files)',
],
'message': 'Updating dependent qrc files..',
}],
'rules': [{
'rule_name': 'qt_rcc',
'extension': 'qrc',
'inputs': [
'<(qrc_timestamp)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
],
'action': [
'<(qt_loc)/bin/rcc<(exe_ext)',
'-name', '<(RULE_INPUT_ROOT)',
'-no-compress',
'<(RULE_INPUT_PATH)',
'-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
],
'message': 'Rcc-ing <(RULE_INPUT_ROOT).qrc..',
'process_outputs_as_sources': 1,
}],
}