2016-08-10 19:36:00 +00:00
|
|
|
# This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
# the official desktop application for the Telegram messaging service.
|
2016-08-10 19:36:00 +00:00
|
|
|
#
|
2018-01-03 10:23:14 +00:00
|
|
|
# For license and copyright information please follow this link:
|
|
|
|
# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2016-08-10 19:36:00 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
'conditions': [
|
|
|
|
[ 'build_win', {
|
2016-08-27 04:49:18 +00:00
|
|
|
'defines': [
|
|
|
|
'WIN32',
|
|
|
|
'_WINDOWS',
|
|
|
|
'_UNICODE',
|
|
|
|
'UNICODE',
|
|
|
|
'HAVE_STDINT_H',
|
|
|
|
'ZLIB_WINAPI',
|
|
|
|
'_SCL_SECURE_NO_WARNINGS',
|
|
|
|
'_USING_V110_SDK71_',
|
|
|
|
],
|
2019-04-03 18:51:14 +00:00
|
|
|
'msbuild_toolset': 'v142',
|
2016-08-10 19:36:00 +00:00
|
|
|
'msvs_cygwin_shell': 0,
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
|
|
|
'DebugInformationFormat': '3', # Program Database (/Zi)
|
2017-12-11 12:28:58 +00:00
|
|
|
'WarnAsError': 'true',
|
2016-08-10 19:36:00 +00:00
|
|
|
'AdditionalOptions': [
|
2019-09-02 10:37:37 +00:00
|
|
|
'/std:<(build_standard_win)',
|
2017-12-11 12:28:58 +00:00
|
|
|
'/permissive-',
|
2018-01-27 09:32:55 +00:00
|
|
|
'/Qspectre',
|
2017-09-21 19:21:33 +00:00
|
|
|
'/MP', # Enable multi process build.
|
|
|
|
'/EHsc', # Catch C++ exceptions only, extern C functions never throw a C++ exception.
|
|
|
|
'/w14834', # [[nodiscard]]
|
2019-01-18 11:26:43 +00:00
|
|
|
'/w15038', # wrong initialization order
|
2019-04-03 18:51:14 +00:00
|
|
|
'/w14265', # class has virtual functions, but destructor is not virtual
|
2019-09-12 07:18:06 +00:00
|
|
|
'/experimental:preprocessor', # need for range-v3 see https://github.com/ericniebler/range-v3#supported-compilers
|
|
|
|
'/wd5105', # needed for `/experimental:preprocessor`, suppressing C5105 "macro expansion producing 'defined' has undefined behavior"
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
'TreatWChar_tAsBuiltInType': 'false',
|
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2016-08-13 17:43:21 +00:00
|
|
|
'MinimumRequiredVersion': '5.01',
|
2016-08-10 19:36:00 +00:00
|
|
|
'ImageHasSafeExceptionHandlers': 'false', # Disable /SAFESEH
|
|
|
|
},
|
|
|
|
},
|
2016-10-02 09:30:28 +00:00
|
|
|
'msvs_external_builder_build_cmd': [
|
|
|
|
'ninja.exe',
|
|
|
|
'-C',
|
|
|
|
'$(OutDir)',
|
|
|
|
'-k0',
|
|
|
|
'$(ProjectName)',
|
|
|
|
],
|
2016-08-10 19:36:00 +00:00
|
|
|
'libraries': [
|
2017-04-19 09:44:07 +00:00
|
|
|
'-lwinmm',
|
|
|
|
'-limm32',
|
|
|
|
'-lws2_32',
|
|
|
|
'-lkernel32',
|
|
|
|
'-luser32',
|
|
|
|
'-lgdi32',
|
|
|
|
'-lwinspool',
|
|
|
|
'-lcomdlg32',
|
|
|
|
'-ladvapi32',
|
|
|
|
'-lshell32',
|
|
|
|
'-lole32',
|
|
|
|
'-loleaut32',
|
|
|
|
'-luuid',
|
|
|
|
'-lodbc32',
|
|
|
|
'-lodbccp32',
|
|
|
|
'-lShlwapi',
|
|
|
|
'-lIphlpapi',
|
|
|
|
'-lGdiplus',
|
|
|
|
'-lStrmiids',
|
2016-08-10 19:36:00 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'Optimization': '0', # Disabled (/Od)
|
|
|
|
'RuntimeLibrary': '1', # Multi-threaded Debug (/MTd)
|
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'GenerateDebugInformation': 'true', # true (/DEBUG)
|
2016-08-13 17:43:21 +00:00
|
|
|
'IgnoreDefaultLibraryNames': 'LIBCMT',
|
2016-08-10 19:36:00 +00:00
|
|
|
'LinkIncremental': '2', # Yes (/INCREMENTAL)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2016-08-13 17:43:21 +00:00
|
|
|
'Optimization': '2', # Maximize Speed (/O2)
|
|
|
|
'InlineFunctionExpansion': '2', # Any suitable (/Ob2)
|
|
|
|
'EnableIntrinsicFunctions': 'true', # Yes (/Oi)
|
|
|
|
'FavorSizeOrSpeed': '1', # Favor fast code (/Ot)
|
|
|
|
'RuntimeLibrary': '0', # Multi-threaded (/MT)
|
|
|
|
'EnableEnhancedInstructionSet': '2', # Streaming SIMD Extensions 2 (/arch:SSE2)
|
|
|
|
'WholeProgramOptimization': 'true', # /GL
|
2016-08-10 19:36:00 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2016-08-13 17:43:21 +00:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
|
|
|
'OptimizeReferences': '2',
|
|
|
|
'LinkTimeCodeGeneration': '1', # /LTCG
|
2016-08-10 19:36:00 +00:00
|
|
|
},
|
2017-12-29 21:06:43 +00:00
|
|
|
'VCLibrarianTool': {
|
|
|
|
'LinkTimeCodeGeneration': 'true', # /LTCG
|
|
|
|
},
|
2016-08-10 19:36:00 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2016-09-09 06:15:11 +00:00
|
|
|
'conditions': [
|
2017-02-01 10:12:52 +00:00
|
|
|
[ '"<(official_build_target)" != "" and "<(official_build_target)" != "win" and "<(official_build_target)" != "uwp"', {
|
2016-09-09 06:15:11 +00:00
|
|
|
'sources': [ '__Wrong_Official_Build_Target__' ],
|
|
|
|
}],
|
|
|
|
],
|
2016-08-10 19:36:00 +00:00
|
|
|
}],
|
|
|
|
],
|
|
|
|
}
|