]> khamidou — GitHub mirrors - electron.git/commitdiff
Build with Quincy.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 1 Jun 2013 06:29:35 +0000 (14:29 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 1 Jun 2013 07:17:45 +0000 (15:17 +0800)
atom.gyp

index f54eb084db74621a5d2072a786b5cbf75148a83a..2a7ae441759003f48a84a4883dbc44bf515158d0 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
       'app/atom_library_main.cc',
       'app/atom_library_main.h',
     ],
+    'fix_framework_link_command': [
+      'install_name_tool',
+      '-change',
+      '@executable_path/../Frameworks/Quincy.framework/Versions/A/Quincy',
+      '@rpath/Quincy.framework/Versions/A/Quincy',
+      '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
+    ],
   },
   'includes': [
     'vendor/brightray/brightray.gypi'
   ],
+  'target_defaults': {
+    'mac_framework_dirs': [ 'frameworks' ],
+  },
   'targets': [
     {
       'target_name': '<(project_name)',
               'files': [
                 '<(PRODUCT_DIR)/<(product_name) Helper.app',
                 '<(PRODUCT_DIR)/<(product_name).framework',
+                'frameworks/Quincy.framework'
               ],
             },
             {
             },
           ],
           'postbuilds': [
+            {
+              'postbuild_name': 'Fix Framework Link',
+              'action': [
+                '<@(fix_framework_link_command)',
+              ],
+            },
             {
               # This postbuid step is responsible for creating the following
               # helpers:
         '.',
         'vendor',
       ],
-      'conditions': [
-        ['OS=="mac"', {
-          'link_settings': {
-            'libraries': [
-              '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
-            ],
-          },
-        }],
-      ],
     },
     {
       'target_name': 'generated_sources',
             'vendor',
             '<(libchromiumcontent_include_dir)',
           ],
+          'link_settings': {
+            'libraries': [
+              '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
+              'frameworks/Quincy.framework',
+            ],
+          },
           'mac_bundle': 1,
           'mac_bundle_resources': [
             'browser/mac/MainMenu.xib',
               ],
             },
           ],
-        },
+          'postbuilds': [
+            {
+              'postbuild_name': 'Fix Framework Link',
+              'action': [
+                '<@(fix_framework_link_command)',
+              ],
+            },
+          ],
+        },  # target framework
         {
           'target_name': '<(project_name)_helper',
           'product_name': '<(product_name) Helper',
           'mac_bundle': 1,
           'xcode_settings': {
             'INFOPLIST_FILE': 'renderer/mac/Info.plist',
-            'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../../../../Frameworks',
+            'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../../..',
           },
-        },
+          'postbuilds': [
+            {
+              'postbuild_name': 'Fix Framework Link',
+              'action': [
+                '<@(fix_framework_link_command)',
+              ],
+            },
+          ],
+        },  # target helper
       ],
     }],
   ],