Browse Source

build: [gn mac] only link libnode.dylib in component build

Jeremy Apthorp 6 years ago
parent
commit
af7800bab1
1 changed files with 13 additions and 9 deletions
  1. 13 9
      BUILD.gn

+ 13 - 9
BUILD.gn

@@ -436,14 +436,16 @@ if (is_mac) {
     ]
   }
 
-  bundle_data("electron_framework_libraries") {
-    public_deps = [ "build/node" ]
-    sources = [
-      "$root_out_dir/libnode.dylib"
-    ]
-    outputs = [
-      "{{bundle_contents_dir}}/Libraries/{{source_file_part}}"
-    ]
+  if (is_component_build) {
+    bundle_data("electron_framework_libraries") {
+      public_deps = [ "build/node" ]
+      sources = [
+        "$root_out_dir/libnode.dylib"
+      ]
+      outputs = [
+        "{{bundle_contents_dir}}/Libraries/{{source_file_part}}"
+      ]
+    }
   }
 
   bundle_data("electron_crashpad_helper") {
@@ -468,13 +470,15 @@ if (is_mac) {
     deps = [
       "//base",
       "//base:i18n",
-      ":electron_framework_libraries",
       ":electron_framework_resources",
       ":electron_xibs",
     ]
     if (!is_mas_build) {
       deps += [ ":electron_crashpad_helper" ]
     }
+    if (is_component_build) {
+      deps += [ ":electron_framework_libraries" ]
+    }
     info_plist = "atom/common/resources/mac/Info.plist"
     extra_substitutions = [
       "ATOM_BUNDLE_ID=$electron_mac_bundle_id.framework",