b970d4b5b53cfe283fc24f29799cce5d73894c34
[WebKit-https.git] / Source / JavaScriptGlue / gyp / JavaScriptGlue.gyp
1 {
2   'includes': [
3     '../../gyp/common.gypi',
4     'JavaScriptGlue.gypi',
5   ],
6   'configurations': {
7     'Production': {
8       'xcode_config_file': '<(project_dir)/Configurations/Base.xcconfig',
9       'xcode_settings': {
10         'BUILD_VARIANTS': 'normal',
11         'SECTORDER_FLAGS': [
12           '-sectorder',
13           '__TEXT',
14           '__text',
15           '$(APPLE_INTERNAL_DIR)/OrderFiles/JavaScriptGlue.order',
16         ],
17       },
18     },
19     'Release': {
20       'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig',
21       'xcode_settings': {
22         'COPY_PHASE_STRIP': 'YES',
23         'GCC_ENABLE_FIX_AND_CONTINUE': 'NO',
24         'ZERO_LINK': 'NO',
25         'STRIP_INSTALLED_PRODUCT': 'NO',
26         'INSTALL_PATH': '$(BUILT_PRODUCTS_DIR)',
27       },
28     },
29     'Debug': {
30       'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig',
31       'xcode_settings': {
32         'COPY_PHASE_STRIP': 'NO',
33         'GCC_DYNAMIC_NO_PIC': 'NO',
34         'DEBUG_DEFINES': '$(DEBUG_DEFINES_debug)',
35         'GCC_OPTIMIZATION_LEVEL': '$(GCC_OPTIMIZATION_LEVEL_debug)',
36         'STRIP_INSTALLED_PRODUCT': '$(STRIP_INSTALLED_PRODUCT_debug)',
37         'INSTALL_PATH': '$(BUILT_PRODUCTS_DIR)',
38       },
39     },
40   },
41   'targets': [
42     {
43       'target_name': 'JavaScriptGlue',
44       'type': 'shared_library',
45       'dependencies': [
46         'Update Version'
47       ],
48       'include_dirs': [
49         '<(project_dir)/ForwardingHeaders',
50         '<(project_dir)/icu',
51         '<(PRODUCT_DIR)/include',
52       ],
53       'sources': [
54         '<@(javascriptglue_files)',
55         '<(PRODUCT_DIR)/JavaScriptCore.framework',
56         '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
57         '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
58         '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
59       ],
60       'xcode_config_file': '<(project_dir)/Configurations/JavaScriptGlue.xcconfig',
61       'postbuilds': [
62         {
63           'postbuild_name': 'Check For Global Initializers',
64           'action': [
65             'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers'
66           ],
67         },
68         {
69           'postbuild_name': 'Check For Weak VTables and Externals',
70           'action': [
71             'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals'
72           ],
73         },
74         {
75           'postbuild_name': 'Remove Headers If Needed',
76           'action': [
77             'sh', '<(DEPTH)/gyp/remove-headers-if-needed.sh'
78           ],
79         },
80       ],
81       'conditions': [
82         ['OS=="mac"', {
83           'mac_bundle': 1,
84           'xcode_settings': {
85             'OTHER_CFLAGS': '-Wno-deprecated-declarations',
86             # FIXME: Remove these overrides once JavaScriptGlue.xcconfig is
87             # used only by this project.
88             'INFOPLIST_FILE': '<(project_dir)/Info.plist',
89             'EXPORTED_SYMBOLS_FILE': '<(project_dir)/JavaScriptGlue.exp', 
90           },
91         }],
92       ],
93     },
94     {
95       'target_name': 'Update Version',
96       'type': 'none',
97       'actions': [{
98         'action_name': 'Update Info.plist with version information',
99         'inputs': [],
100          'outputs': [],
101          'action': [
102            'sh', '<(DEPTH)/gyp/update-info-plist.sh', '<(project_dir)/Info.plist'
103           ]
104       }],
105     },
106   ], # targets
107 }