Skip to content

Commit

Permalink
Added Xcode projects to .gitignore, added some Xcode settings to GYP.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 30, 2016
1 parent d703746 commit b821978
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*.opendb
*.VC.db
*.aps
*.xcodeproj
/Win32/
ipch/

Expand Down
11 changes: 10 additions & 1 deletion Telegram/gyp/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@
'build_win%': '<(build_win)',
'build_mac%': '<(build_mac)',
'build_linux%': '<(build_linux)',

'official_build_target%': '<!(python <(DEPTH)/official.py --read-target)',
},
'build_os%': '<(build_os)',
'build_win%': '<(build_win)',
'build_mac%': '<(build_mac)',
'build_linux%': '<(build_linux)',
'official_build_target%': '<(official_build_target)',
'mac_target%': '10.8',

# GYP does not support per-configuration libraries :(
Expand All @@ -77,14 +80,20 @@
'ld_lib_postfix': '',
'exe_ext': '',
}],
[ '"<(official_build_target)" == "mac32"', {
'mac_target%': '10.6',
'build_mac32': 1,
}, {
'mac_target%': '10.8',
'build_mac32': 0,
}]
],
'ld_lib_prefix': '<(ld_lib_prefix)',
'ld_lib_postfix': '<(ld_lib_postfix)',
'exe_ext': '<(exe_ext)',

'library%': 'static_library',

'official_build_target%': '<!(python <(DEPTH)/official.py --read-target)',
},

'configurations': {
Expand Down
26 changes: 22 additions & 4 deletions Telegram/gyp/settings_mac.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,37 @@
'CoreWLAN',
'IOKit',
],
'mac_common_flags': [
'-pipe',
'-g',
'-Wall',
'-W',
'-fPIE',
'-Wno-unused-variable',
'-Wno-unused-parameter',
'-Wno-unused-function',
'-Wno-switch',
'-Wno-comment',
'-Wno-missing-field-initializers',
],
},
'xcode_settings': {
'SYMROOT': '../../out',
'SYMROOT': '../../out',
'OTHER_CFLAGS': [
'<@(mac_common_flags)',
],
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++14',
'-Wno-switch',
'-stdlib=libc++',
'<@(mac_common_flags)',
],
'OTHER_LDFLAGS': [
'-stdlib=libc++',
'<!@(python -c "for s in \'<@(mac_frameworks)\'.split(\' \'): print(\'-framework \' + s)")',
],
'MACOSX_DEPLOYMENT_TARGET': '<(mac_target)',
'COMBINE_HIDPI_IMAGES': 'YES',
'COPY_PHASE_STRIP': 'NO',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++14',
'CLANG_CXX_LIBRARY': 'libc++',
},
}],
],
Expand Down
18 changes: 13 additions & 5 deletions Telegram/gyp/telegram_mac.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
'-lm',
'-lssl',
'-lcrypto',
'-llzma',
'-lopenal',
'-lopus',
'-lexif',
'/usr/local/lib/liblzma.a',
'/usr/local/lib/libopenal.a',
'/usr/local/lib/libopus.a',
'/usr/local/lib/libexif.a',
'-lavcodec',
'-lavformat',
'-lswscale',
'-lswresample',
'-lavutil',
'-liconv',
'/usr/local/lib/libiconv.a',
'-lbase',
'-lcrashpad_client',
'-lcrashpad_util',
Expand All @@ -60,11 +60,19 @@
'library_dirs': [
'<(libs_loc)/crashpad/crashpad/out/Debug',
],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '0',
},
},
'Release': {
'library_dirs': [
'<(libs_loc)/crashpad/crashpad/out/Release',
],
'xcode_settings': {
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
'LLVM_LTO': 'YES',
'GCC_OPTIMIZATION_LEVEL': 'fast',
},
},
},
'mac_bundle': '1',
Expand Down

0 comments on commit b821978

Please sign in to comment.