Index: build/config/linux/BUILD.gn |
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn |
index bfe242c3f7b94b17f5714c58407cd53c895ceeff..bc5bde33d0f95c957403a3f5e789422affd5b710 100644 |
--- a/build/config/linux/BUILD.gn |
+++ b/build/config/linux/BUILD.gn |
@@ -5,6 +5,7 @@ |
import("//build/config/linux/pkg_config.gni") |
import("//build/config/sysroot.gni") |
import("//build/config/ui.gni") |
+import("//tools/generate_library_loader/generate_library_loader.gni") |
config("sdk") { |
if (sysroot != "") { |
@@ -107,47 +108,6 @@ pkg_config("gconf") { |
defines = [ "USE_GCONF" ] |
} |
-# name: Name to use for the value of the --name arg. |
-# output_h/output_cc: Names for the generated header/cc file with no dir. |
-# header: header file to process. Example: "<foo/bar.h>" |
-# functions: List of strings for functions to process. |
-# config: Label of the config generated by pkgconfig. |
-template("generate_library_loader") { |
- output_h = "$root_gen_dir/library_loaders/" + invoker.output_h |
- output_cc = "$root_gen_dir/library_loaders/" + invoker.output_cc |
- |
- action_visibility = ":$target_name" |
- action("${target_name}_loader") { |
- visibility = action_visibility |
- |
- script = "//tools/generate_library_loader/generate_library_loader.py" |
- if (defined(invoker.visibility)) { |
- visibility = invoker.visibility |
- } |
- |
- outputs = [ output_h, output_cc ] |
- |
- args = [ |
- "--name", invoker.name, |
- "--output-h", rebase_path(output_h), |
- "--output-cc", rebase_path(output_cc), |
- "--header", invoker.header, |
- # Note GYP build exposes a per-target variable to control this, which, if |
- # manually set to true, will disable dlopen(). Its not clear this is |
- # needed, so here we just leave off. If this can be done globally, we |
- # can expose one switch for this value, otherwise we need to add a template |
- # param for this. |
- "--link-directly=0", |
- ] + invoker.functions |
- } |
- |
- source_set(target_name) { |
- direct_dependent_configs = [ invoker.config ] |
- sources = [ output_h, output_cc ] |
- deps = [ ":${target_name}_loader" ] |
- } |
-} |
- |
pkg_config("gio_config") { |
packages = [ "gio-2.0" ] |
defines = [ "USE_GIO" ] |
@@ -173,21 +133,12 @@ generate_library_loader("gio") { |
] |
} |
-# pkgconfig doesn't return anything interesting for this other than -lpci |
-# on suppotred systems, so we hardcode. |
-config("libpci_config") { |
- # This is not needed as long as we're setting link_directly=0 for the library |
- # loaders. |
- #libs = [ "pci" ] |
-} |
- |
# This generates a target named "libpci". |
generate_library_loader("libpci") { |
name = "LibPciLoader" |
output_h = "libpci.h" |
output_cc = "libpci_loader.cc" |
header = "<pci/pci.h>" |
- config = ":libpci_config" |
functions = [ |
"pci_alloc", |
@@ -198,3 +149,27 @@ generate_library_loader("libpci") { |
"pci_lookup_name", |
] |
} |
+ |
+generate_library_loader("libspeechd") { |
+ name = "LibSpeechdLoader" |
+ output_h = "libspeechd.h" |
+ output_cc = "libspeechd.cc" |
+ header = "<libspeechd.h>" |
+ bundled_header = "\"third_party/speech-dispatcher/libspeechd.h\"" |
+ |
+ functions = [ |
+ "spd_open", |
+ "spd_say", |
+ "spd_stop", |
+ "spd_close", |
+ "spd_pause", |
+ "spd_resume", |
+ "spd_set_notification_on", |
+ "spd_set_voice_rate", |
+ "spd_set_voice_pitch", |
+ "spd_list_synthesis_voices", |
+ "spd_set_synthesis_voice", |
+ "spd_list_modules", |
+ "spd_set_output_module", |
+ ] |
+} |