| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/config/crypto.gni") | 6 import("//build/config/crypto.gni") |
| 7 import("//build/config/features.gni") | 7 import("//build/config/features.gni") |
| 8 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
| 9 import("//build/split_static_library.gni") | 9 import("//build/split_static_library.gni") |
| 10 import("//chrome/common/features.gni") | 10 import("//chrome/common/features.gni") |
| 11 import("//media/media_options.gni") | 11 import("//media/media_options.gni") |
| 12 import("//third_party/protobuf/proto_library.gni") | 12 import("//third_party/protobuf/proto_library.gni") |
| 13 | 13 |
| 14 # //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which | 14 # //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which |
| 15 # produces a conflict for the "grit" template so we have to only include one. | 15 # produces a conflict for the "grit" template so we have to only include one. |
| 16 if (is_android) { | 16 if (is_android) { |
| 17 import("//build/config/android/rules.gni") | 17 import("//build/config/android/rules.gni") |
| 18 } else { | 18 } else { |
| 19 import("//tools/grit/grit_rule.gni") | 19 import("//tools/grit/grit_rule.gni") |
| 20 } | 20 } |
| 21 if (is_desktop_linux) { | |
| 22 import("//build/config/linux/pkg_config.gni") | |
| 23 } | |
| 24 | 21 |
| 25 additional_modules_list_file = | 22 additional_modules_list_file = |
| 26 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt" | 23 "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt" |
| 27 | 24 |
| 28 gypi_values = exec_script("//build/gypi_to_gn.py", | 25 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 29 [ rebase_path("../chrome_browser.gypi") ], | 26 [ rebase_path("../chrome_browser.gypi") ], |
| 30 "scope", | 27 "scope", |
| 31 [ "../chrome_browser.gypi" ]) | 28 [ "../chrome_browser.gypi" ]) |
| 32 | 29 |
| 33 if (is_win) { | 30 if (is_win) { |
| 34 # This is in a separate config so the flags can be applied to dependents. | 31 # This is in a separate config so the flags can be applied to dependents. |
| 35 # ldflags in GN aren't automatically inherited. | 32 # ldflags in GN aren't automatically inherited. |
| 36 config("browser_win_linker_flags") { | 33 config("browser_win_linker_flags") { |
| 37 libs = [ | 34 libs = [ |
| 38 "credui.lib", | 35 "credui.lib", |
| 39 "cryptui.lib", | 36 "cryptui.lib", |
| 40 "dwmapi.lib", | 37 "dwmapi.lib", |
| 41 "netapi32.lib", | 38 "netapi32.lib", |
| 42 "ndfapi.lib", # Used by browser/net/net_error_diagnostics_dialog_win.h | 39 "ndfapi.lib", # Used by browser/net/net_error_diagnostics_dialog_win.h |
| 43 "pdh.lib", # Used by browser/private_working_set_snapshot.h | 40 "pdh.lib", # Used by browser/private_working_set_snapshot.h |
| 44 ] | 41 ] |
| 45 ldflags = [ | 42 ldflags = [ |
| 46 "/DELAYLOAD:ndfapi.dll", | 43 "/DELAYLOAD:ndfapi.dll", |
| 47 "/DELAYLOAD:pdh.dll", # The task manager is rarely used. | 44 "/DELAYLOAD:pdh.dll", # The task manager is rarely used. |
| 48 ] | 45 ] |
| 49 } | 46 } |
| 50 } | 47 } |
| 51 | 48 |
| 52 if (is_desktop_linux) { | |
| 53 # Gnome-keyring is normally dynamically loaded. The gnome_keyring config | |
| 54 # will set this up. | |
| 55 pkg_config("gnome_keyring") { | |
| 56 packages = [ "gnome-keyring-1" ] | |
| 57 defines = [ "USE_GNOME_KEYRING" ] | |
| 58 ignore_libs = true | |
| 59 } | |
| 60 | |
| 61 # If you want to link gnome-keyring directly (use only for unit tests) | |
| 62 # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a | |
| 63 # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs | |
| 64 # are just itself and common gnome ones we link already, so we can get away | |
| 65 # with additionally just coding the library name here. | |
| 66 config("gnome_keyring_direct") { | |
| 67 libs = [ "gnome-keyring" ] | |
| 68 } | |
| 69 } | |
| 70 | |
| 71 # Use a static library here because many test binaries depend on this but don't | 49 # Use a static library here because many test binaries depend on this but don't |
| 72 # require many files from it. This makes linking more efficient. | 50 # require many files from it. This makes linking more efficient. |
| 73 split_static_library("browser") { | 51 split_static_library("browser") { |
| 74 # Split into multiple static libraries on Windows official builds, where we | 52 # Split into multiple static libraries on Windows official builds, where we |
| 75 # run into a 2GB max size limit. | 53 # run into a 2GB max size limit. |
| 76 if (is_win && is_official_build) { | 54 if (is_win && is_official_build) { |
| 77 split_count = 5 | 55 split_count = 5 |
| 78 } else { | 56 } else { |
| 79 split_count = 1 | 57 split_count = 1 |
| 80 } | 58 } |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 ] | 562 ] |
| 585 } | 563 } |
| 586 | 564 |
| 587 if (use_cups) { | 565 if (use_cups) { |
| 588 configs += [ "//printing:cups" ] | 566 configs += [ "//printing:cups" ] |
| 589 } | 567 } |
| 590 if (is_desktop_linux) { | 568 if (is_desktop_linux) { |
| 591 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources, | 569 sources += rebase_path(gypi_values.chrome_browser_gnome_keyring_sources, |
| 592 ".", | 570 ".", |
| 593 "//chrome") | 571 "//chrome") |
| 594 configs += [ ":gnome_keyring" ] | 572 configs += [ "//components/os_crypt:gnome_keyring" ] |
| 595 } | 573 } |
| 596 if (is_desktop_linux) { | 574 if (is_desktop_linux) { |
| 597 sources += rebase_path(gypi_values.chrome_browser_libsecret_sources, | 575 sources += rebase_path(gypi_values.chrome_browser_libsecret_sources, |
| 598 ".", | 576 ".", |
| 599 "//chrome") | 577 "//chrome") |
| 600 defines += [ "USE_LIBSECRET" ] | 578 defines += [ "USE_LIBSECRET" ] |
| 601 deps += [ "//third_party/libsecret" ] | 579 deps += [ "//third_party/libsecret" ] |
| 602 } | 580 } |
| 603 if (use_aura) { | 581 if (use_aura) { |
| 604 sources += | 582 sources += |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 # linking all of the test support. | 1346 # linking all of the test support. |
| 1369 static_library("pepper_cdm_test_constants") { | 1347 static_library("pepper_cdm_test_constants") { |
| 1370 testonly = true | 1348 testonly = true |
| 1371 visibility = [ "//chrome/*" ] | 1349 visibility = [ "//chrome/*" ] |
| 1372 sources = [ | 1350 sources = [ |
| 1373 "media/pepper_cdm_test_constants.cc", | 1351 "media/pepper_cdm_test_constants.cc", |
| 1374 "media/pepper_cdm_test_constants.h", | 1352 "media/pepper_cdm_test_constants.h", |
| 1375 ] | 1353 ] |
| 1376 } | 1354 } |
| 1377 } | 1355 } |
| OLD | NEW |