81 lines
3.0 KiB
Diff
81 lines
3.0 KiB
Diff
diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
|
|
index a2b9629..68d7020 100644
|
|
--- a/pylib/gyp/generator/cmake.py
|
|
+++ b/pylib/gyp/generator/cmake.py
|
|
@@ -1070,6 +1070,23 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
|
|
|
|
output.write(')\n')
|
|
|
|
+ # Precompile header
|
|
+ precompiled_header = config.get('cmake_precompiled_header', '')
|
|
+ if precompiled_header:
|
|
+ precompiled_header_script = config.get('cmake_precompiled_header_script', '')
|
|
+ if not precompiled_header_script:
|
|
+ print ('ERROR: cmake_precompiled_header requires cmake_precompiled_header_script')
|
|
+ cmake_precompiled_header = NormjoinPath(path_from_cmakelists_to_gyp, precompiled_header)
|
|
+ cmake_precompiled_header_script = NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, precompiled_header_script)
|
|
+ output.write('include(')
|
|
+ output.write(cmake_precompiled_header_script)
|
|
+ output.write(')\n')
|
|
+ output.write('add_precompiled_header(')
|
|
+ output.write(cmake_target_name)
|
|
+ output.write(' ')
|
|
+ output.write(cmake_precompiled_header)
|
|
+ output.write(')\n')
|
|
+
|
|
UnsetVariable(output, 'TOOLSET')
|
|
UnsetVariable(output, 'TARGET')
|
|
|
|
diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py
|
|
index db99d6a..8d56baf 100644
|
|
--- a/pylib/gyp/generator/xcode.py
|
|
+++ b/pylib/gyp/generator/xcode.py
|
|
@@ -72,6 +72,10 @@ generator_additional_non_configuration_keys = [
|
|
'ios_app_extension',
|
|
'ios_watch_app',
|
|
'ios_watchkit_extension',
|
|
+
|
|
+ 'mac_sandbox', # sandbox support
|
|
+ 'mac_sandbox_development_team',
|
|
+
|
|
'mac_bundle',
|
|
'mac_bundle_resources',
|
|
'mac_framework_headers',
|
|
@@ -772,6 +776,26 @@ def GenerateOutput(target_list, target_dicts, data, params):
|
|
xcode_targets[qualified_target] = xct
|
|
xcode_target_to_target_dict[xct] = spec
|
|
|
|
+ # sandbox support
|
|
+ is_sandbox = int(spec.get('mac_sandbox', 0))
|
|
+ if is_sandbox:
|
|
+ dev_team = spec.get('mac_sandbox_development_team', '%%ERROR%%')
|
|
+ assert dev_team != '%%ERROR%%', (
|
|
+ 'mac_sandbox must be accompanied by mac_sandbox_development_team (target "%s")' %
|
|
+ target_name)
|
|
+ try:
|
|
+ tmp = pbxp._properties['attributes']['TargetAttributes']
|
|
+ except KeyError:
|
|
+ pbxp._properties['attributes']['TargetAttributes'] = {}
|
|
+ pbxp._properties['attributes']['TargetAttributes'][xct] = {
|
|
+ 'DevelopmentTeam': dev_team,
|
|
+ 'SystemCapabilities': {
|
|
+ 'com.apple.Sandbox': {
|
|
+ 'enabled': 1,
|
|
+ },
|
|
+ },
|
|
+ }
|
|
+
|
|
spec_actions = spec.get('actions', [])
|
|
spec_rules = spec.get('rules', [])
|
|
|
|
@@ -1141,7 +1165,8 @@ exit 1
|
|
groups = [x for x in groups if not x.endswith('_excluded')]
|
|
for group in groups:
|
|
for item in rule.get(group, []):
|
|
- pbxp.AddOrGetFileInRootGroup(item)
|
|
+ concrete_item = ExpandXcodeVariables(item, rule_input_dict)
|
|
+ pbxp.AddOrGetFileInRootGroup(concrete_item)
|
|
|
|
# Add "sources".
|
|
for source in spec.get('sources', []):
|