|
5 | 5 | assert(is_win)
|
6 | 6 |
|
7 | 7 | import("$flutter_root/shell/platform/glfw/config.gni")
|
| 8 | +import("$flutter_root/testing/testing.gni") |
8 | 9 |
|
9 | 10 | _public_headers = [ "public/flutter_windows.h" ]
|
10 | 11 |
|
@@ -100,6 +101,63 @@ shared_library("flutter_windows") {
|
100 | 101 | public_configs = [ "$flutter_root:config" ]
|
101 | 102 | }
|
102 | 103 |
|
| 104 | +test_fixtures("flutter_windows_fixtures") { |
| 105 | + fixtures = [] |
| 106 | +} |
| 107 | + |
| 108 | +executable("flutter_windows_unittests") { |
| 109 | + testonly = true |
| 110 | + |
| 111 | + sources = [ |
| 112 | + "win32_window_unittests.cc", |
| 113 | + "testing/win32_flutter_window_test.h", |
| 114 | + "testing/win32_flutter_window_test.cc", |
| 115 | + "angle_surface_manager.cc", |
| 116 | + "angle_surface_manager.h", |
| 117 | + "flutter_windows.cc", |
| 118 | + "key_event_handler.cc", |
| 119 | + "key_event_handler.h", |
| 120 | + "keyboard_hook_handler.h", |
| 121 | + "platform_handler.cc", |
| 122 | + "platform_handler.h", |
| 123 | + "text_input_plugin.cc", |
| 124 | + "text_input_plugin.h", |
| 125 | + "win32_dpi_helper.cc", |
| 126 | + "win32_dpi_helper.h", |
| 127 | + "win32_flutter_window.cc", |
| 128 | + "win32_flutter_window.h", |
| 129 | + "win32_window.cc", |
| 130 | + "win32_window.h", |
| 131 | + "window_state.h", |
| 132 | + ] |
| 133 | + |
| 134 | + defines = [ "USE_RAPID_JSON" ] |
| 135 | + |
| 136 | + configs += [ |
| 137 | + "$flutter_root/shell/platform/common/cpp:desktop_library_implementation", |
| 138 | + "//third_party/angle:gl_prototypes", |
| 139 | + ] |
| 140 | + |
| 141 | + public_configs = [ ":relative_angle_headers" ] |
| 142 | + |
| 143 | + deps = [ |
| 144 | + ":flutter_windows_headers", |
| 145 | + "$flutter_root/shell/platform/common/cpp:common_cpp", |
| 146 | + "$flutter_root/shell/platform/common/cpp/client_wrapper:client_wrapper", |
| 147 | + "$flutter_root/shell/platform/embedder:embedder_with_symbol_prefix", |
| 148 | + "$flutter_root/shell/platform/windows/client_wrapper:client_wrapper_windows", |
| 149 | + "//third_party/angle:libEGL_static", # the order of libEGL_static and libGLESv2_static is important.. if reversed, will cause a linker error DllMain already defined in LIBCMTD.lib |
| 150 | + "//third_party/angle:libGLESv2_static", |
| 151 | + "//third_party/rapidjson", |
| 152 | + ":flutter_windows_fixtures", |
| 153 | + "$flutter_root/testing", |
| 154 | + # TODO(chunhtai): Consider refactoring flutter_root/testing so that there's a testing |
| 155 | + # target that doesn't require a Dart runtime to be linked in. |
| 156 | + # https://github.com/flutter/flutter/issues/41414. |
| 157 | + "//third_party/dart/runtime:libdart_jit", |
| 158 | + ] |
| 159 | +} |
| 160 | + |
103 | 161 | shared_library("flutter_windows_glfw") {
|
104 | 162 | deps = [
|
105 | 163 | "$flutter_root/shell/platform/glfw:flutter_glfw",
|
|
0 commit comments