2016-08-10 19:36:00 +00:00
|
|
|
# This file is part of Telegram Desktop,
|
|
|
|
# the official desktop version of Telegram messaging app, see https://telegram.org
|
|
|
|
#
|
|
|
|
# Telegram Desktop is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# It is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# In addition, as a special exception, the copyright holders give permission
|
|
|
|
# to link the code of portions of this program with the OpenSSL library.
|
|
|
|
#
|
|
|
|
# Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
|
|
|
# Copyright (c) 2014 John Preston, https://desktop.telegram.org
|
|
|
|
|
|
|
|
{
|
|
|
|
'variables': {
|
|
|
|
'variables': {
|
|
|
|
'variables': {
|
2016-08-28 19:36:51 +00:00
|
|
|
'variables': {
|
|
|
|
'qt_libs': [
|
|
|
|
'Qt5Core',
|
|
|
|
'Qt5Gui',
|
|
|
|
'Qt5Widgets',
|
|
|
|
'qtharfbuzzng',
|
|
|
|
'Qt5Network',
|
|
|
|
'Qt5PlatformSupport',
|
|
|
|
'Qt5PrintSupport',
|
|
|
|
'qwebp',
|
|
|
|
],
|
2016-08-30 05:24:16 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'build_macold', {
|
|
|
|
'qt_version%': '5.3.2',
|
|
|
|
}, {
|
|
|
|
'qt_version%': '5.6.0',
|
|
|
|
}]
|
|
|
|
],
|
2016-08-28 19:36:51 +00:00
|
|
|
},
|
2016-08-30 05:24:16 +00:00
|
|
|
'qt_version%': '<(qt_version)',
|
2016-08-28 19:36:51 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'build_win', {
|
|
|
|
'qt_lib_prefix': '<(ld_lib_prefix)',
|
|
|
|
'qt_lib_debug_postfix': 'd<(ld_lib_postfix)',
|
|
|
|
'qt_lib_release_postfix': '<(ld_lib_postfix)',
|
|
|
|
'qt_libs': [
|
|
|
|
'<@(qt_libs)',
|
|
|
|
'qtmain',
|
|
|
|
'qwindows',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'build_mac', {
|
|
|
|
'qt_lib_prefix': '<(ld_lib_prefix)',
|
|
|
|
'qt_lib_debug_postfix': '_debug<(ld_lib_postfix)',
|
|
|
|
'qt_lib_release_postfix': '<(ld_lib_postfix)',
|
|
|
|
'qt_libs': [
|
|
|
|
'<@(qt_libs)',
|
|
|
|
'qgenericbearer',
|
|
|
|
'qcocoa',
|
|
|
|
],
|
|
|
|
}],
|
2016-08-30 05:24:16 +00:00
|
|
|
[ 'build_macold', {
|
|
|
|
'qt_loc_unix': '/usr/local/Qt-<(qt_version)'
|
|
|
|
}, {
|
|
|
|
'qt_loc_unix': '/usr/local/tdesktop/Qt-<(qt_version)',
|
|
|
|
'qt_libs': [
|
|
|
|
'<@(qt_libs)',
|
|
|
|
'qtfreetype',
|
|
|
|
'qtpcre',
|
|
|
|
],
|
|
|
|
}]
|
2016-08-28 19:36:51 +00:00
|
|
|
],
|
2016-08-10 19:36:00 +00:00
|
|
|
},
|
|
|
|
'qt_version%': '<(qt_version)',
|
2016-08-30 05:24:16 +00:00
|
|
|
'qt_loc_unix': '<(qt_loc_unix)',
|
2016-08-28 19:36:51 +00:00
|
|
|
'qt_version_loc': '<!(python -c "print(\'<(qt_version)\'.replace(\'.\', \'_\'))")',
|
|
|
|
'qt_libs_debug': [
|
|
|
|
'<!@(python -c "for s in \'<@(qt_libs)\'.split(\' \'): print(\'<(qt_lib_prefix)\' + s + \'<(qt_lib_debug_postfix)\')")',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
2016-08-28 19:36:51 +00:00
|
|
|
'qt_libs_release': [
|
|
|
|
'<!@(python -c "for s in \'<@(qt_libs)\'.split(\' \'): print(\'<(qt_lib_prefix)\' + s + \'<(qt_lib_release_postfix)\')")',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
},
|
2016-08-28 19:36:51 +00:00
|
|
|
'qt_libs_debug': [ '<@(qt_libs_debug)' ],
|
|
|
|
'qt_libs_release': [ '<@(qt_libs_release)' ],
|
2016-08-10 19:36:00 +00:00
|
|
|
'qt_version%': '<(qt_version)',
|
|
|
|
'conditions': [
|
|
|
|
[ 'build_win', {
|
|
|
|
'qt_loc': '../../../Libraries/qt<(qt_version_loc)/qtbase',
|
|
|
|
}, {
|
2016-08-30 05:24:16 +00:00
|
|
|
'qt_loc': '<(qt_loc_unix)',
|
2016-08-10 19:36:00 +00:00
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'conditions' : [
|
|
|
|
[ 'build_win', {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
2016-08-28 19:36:51 +00:00
|
|
|
'<@(qt_libs_debug)',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}],
|
2016-08-28 19:36:51 +00:00
|
|
|
[ 'build_mac', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [
|
|
|
|
'<@(qt_libs_debug)',
|
|
|
|
'/usr/local/lib/libz.a',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'conditions' : [
|
|
|
|
[ 'build_win', {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
2016-08-28 19:36:51 +00:00
|
|
|
'<@(qt_libs_release)',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}],
|
2016-08-28 19:36:51 +00:00
|
|
|
[ 'build_mac', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_LDFLAGS': [
|
|
|
|
'<@(qt_libs_release)',
|
|
|
|
'/usr/local/lib/libz.a',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
'include_dirs': [
|
|
|
|
'<(qt_loc)/include',
|
|
|
|
'<(qt_loc)/include/QtCore/<(qt_version)/QtCore',
|
|
|
|
'<(qt_loc)/include/QtGui/<(qt_version)/QtGui',
|
|
|
|
],
|
|
|
|
'library_dirs': [
|
|
|
|
'<(qt_loc)/lib',
|
|
|
|
'<(qt_loc)/plugins',
|
2016-08-28 19:36:51 +00:00
|
|
|
'<(qt_loc)/plugins/bearer',
|
|
|
|
'<(qt_loc)/plugins/platforms',
|
|
|
|
'<(qt_loc)/plugins/imageformats',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'QT_WIDGETS_LIB',
|
|
|
|
'QT_NETWORK_LIB',
|
|
|
|
'QT_GUI_LIB',
|
|
|
|
'QT_CORE_LIB',
|
|
|
|
],
|
|
|
|
|
|
|
|
'rules': [{
|
|
|
|
'rule_name': 'qt_moc',
|
|
|
|
'extension': 'h',
|
|
|
|
'outputs': [
|
2016-08-13 17:43:21 +00:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
'action': [
|
2016-08-28 19:36:51 +00:00
|
|
|
'<(qt_loc)/bin/moc<(exe_ext)',
|
2016-08-13 17:43:21 +00:00
|
|
|
|
|
|
|
# Silence "Note: No relevant classes found. No output generated."
|
|
|
|
'--no-notes',
|
|
|
|
|
2016-08-28 19:36:51 +00:00
|
|
|
'<!@(python -c "for s in \'<@(_defines)\'.split(\' \'): print(\'-D\' + s)")',
|
|
|
|
# '<!@(python -c "for s in \'<@(_include_dirs)\'.split(\' \'): print(\'-I\' + s)")',
|
2016-08-10 19:36:00 +00:00
|
|
|
'<(RULE_INPUT_PATH)',
|
2016-08-13 17:43:21 +00:00
|
|
|
'-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/moc/moc_<(RULE_INPUT_ROOT).cpp',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
'message': 'Moc-ing <(RULE_INPUT_ROOT).h..',
|
|
|
|
'process_outputs_as_sources': 1,
|
|
|
|
}, {
|
|
|
|
'rule_name': 'qt_rcc',
|
|
|
|
'extension': 'qrc',
|
2016-08-14 18:05:10 +00:00
|
|
|
'inputs': [
|
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp',
|
|
|
|
],
|
2016-08-10 19:36:00 +00:00
|
|
|
'outputs': [
|
2016-08-13 17:43:21 +00:00
|
|
|
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
'action': [
|
2016-08-28 19:36:51 +00:00
|
|
|
'<(qt_loc)/bin/rcc<(exe_ext)',
|
2016-08-10 19:36:00 +00:00
|
|
|
'-name', '<(RULE_INPUT_ROOT)',
|
|
|
|
'-no-compress',
|
|
|
|
'<(RULE_INPUT_PATH)',
|
2016-08-13 17:43:21 +00:00
|
|
|
'-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
'message': 'Rcc-ing <(RULE_INPUT_ROOT).qrc..',
|
|
|
|
'process_outputs_as_sources': 1,
|
|
|
|
}],
|
|
|
|
}
|