• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2013 The Flutter Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5config("desktop_library_implementation") {
6  defines = [ "FLUTTER_DESKTOP_LIBRARY" ]
7}
8
9_public_headers = [
10  "public/flutter_export.h",
11  "public/flutter_messenger.h",
12  "public/flutter_plugin_registrar.h",
13]
14
15# Any files that are built by clients (client_wrapper code, library headers for
16# implementations using this shared code, etc.) include the public headers
17# assuming they are in the include path. This configuration should be added to
18# any such code that is also built by GN to make the includes work.
19config("relative_flutter_library_headers") {
20  include_dirs = [ "public" ]
21}
22
23# The headers are a separate source set since the client wrapper is allowed
24# to depend on the public headers, but none of the rest of the code.
25source_set("common_cpp_library_headers") {
26  public = _public_headers
27
28  configs += [ ":desktop_library_implementation" ]
29}
30
31source_set("common_cpp") {
32  public = [
33    "incoming_message_dispatcher.h",
34    "text_input_model.h",
35  ]
36
37  # TODO: Refactor flutter_glfw.cc to move the implementations corresponding
38  # to the _public_headers above into this target.
39  sources = [
40    "incoming_message_dispatcher.cc",
41    "text_input_model.cc",
42  ]
43
44  configs += [ ":desktop_library_implementation" ]
45
46  deps = [
47    ":common_cpp_library_headers",
48    "$flutter_root/shell/platform/common/cpp/client_wrapper:client_wrapper",
49    "$flutter_root/shell/platform/embedder:embedder_with_symbol_prefix",
50  ]
51
52  # TODO: Remove once text input model refactor lands, at which point this code
53  # won't have a JSON dependency.
54  defines = [ "USE_RAPID_JSON" ]
55  deps += [ "//third_party/rapidjson" ]
56}
57
58copy("publish_headers") {
59  sources = _public_headers
60  outputs = [ "$root_out_dir/{{source_file_part}}" ]
61}
62