@@ -29,14 +29,20 @@ source_set("flutter_windows_headers") {
2929 public_deps =
3030 [ " //flutter/shell/platform/common/cpp:common_cpp_library_headers" ]
3131
32- configs +=
33- [ " //flutter/shell/platform/common/cpp:desktop_library_implementation" ]
32+ if (target_os == " winuwp" ) {
33+ configs +=
34+ [ " //flutter/shell/platform/common/cpp:desktop_library_implementation" ]
35+ } else {
36+ configs +=
37+ [ " //flutter/shell/platform/common/cpp:desktop_library_implementation" ]
38+ }
3439
3540 public_configs =
3641 [ " //flutter/shell/platform/common/cpp:relative_flutter_library_headers" ]
3742}
3843
3944source_set (" flutter_windows_source" ) {
45+ # Common Windows sources.
4046 sources = [
4147 " angle_surface_manager.cc" ,
4248 " angle_surface_manager.h" ,
@@ -52,29 +58,48 @@ source_set("flutter_windows_source") {
5258 " key_event_handler.cc" ,
5359 " key_event_handler.h" ,
5460 " keyboard_hook_handler.h" ,
61+ " platform_handler.cc" ,
62+ " platform_handler.h" ,
5563 " string_conversion.cc" ,
5664 " string_conversion.h" ,
5765 " system_utils.h" ,
58- " system_utils_win32.cc " ,
66+ " task_runner.h " ,
5967 " text_input_plugin.cc" ,
6068 " text_input_plugin.h" ,
61- " win32_dpi_utils.cc" ,
62- " win32_dpi_utils.h" ,
63- " win32_flutter_window.cc" ,
64- " win32_flutter_window.h" ,
65- " win32_platform_handler.cc" ,
66- " win32_platform_handler.h" ,
67- " win32_task_runner.cc" ,
68- " win32_task_runner.h" ,
69- " win32_window.cc" ,
70- " win32_window.h" ,
71- " win32_window_proc_delegate_manager.cc" ,
72- " win32_window_proc_delegate_manager.h" ,
7369 " window_binding_handler.h" ,
7470 " window_binding_handler_delegate.h" ,
7571 " window_state.h" ,
7672 ]
7773
74+ # Target-specific sources.
75+ if (target_os == " winuwp" ) {
76+ sources += [
77+ " flutter_windows_winuwp.cc" ,
78+ " platform_handler_winuwp.cc" ,
79+ " platform_handler_winuwp.h" ,
80+ " system_utils_winuwp.cc" ,
81+ " task_runner_winuwp.cc" ,
82+ " task_runner_winuwp.h" ,
83+ ]
84+ } else {
85+ sources += [
86+ " flutter_windows_win32.cc" ,
87+ " platform_handler_win32.cc" ,
88+ " platform_handler_win32.h" ,
89+ " system_utils_win32.cc" ,
90+ " task_runner_win32.cc" ,
91+ " task_runner_win32.h" ,
92+ " win32_dpi_utils.cc" ,
93+ " win32_dpi_utils.h" ,
94+ " win32_flutter_window.cc" ,
95+ " win32_flutter_window.h" ,
96+ " win32_window.cc" ,
97+ " win32_window.h" ,
98+ " win32_window_proc_delegate_manager.cc" ,
99+ " win32_window_proc_delegate_manager.h" ,
100+ ]
101+ }
102+
78103 configs += [
79104 " //flutter/shell/platform/common/cpp:desktop_library_implementation" ,
80105 " //third_party/angle:gl_prototypes" ,
@@ -116,40 +141,51 @@ shared_library("flutter_windows") {
116141 public_configs = [ " //flutter:config" ]
117142}
118143
144+ shared_library (" flutter_windows_winuwp" ) {
145+ deps = [ " :flutter_windows_source" ]
146+ libs = [ " windowsapp.lib" ]
147+ public_configs = [ " //flutter:config" ]
148+ }
149+
119150test_fixtures (" flutter_windows_fixtures" ) {
120151 fixtures = []
121152}
122153
123- executable (" flutter_windows_unittests" ) {
124- testonly = true
125-
126- sources = [
127- " flutter_project_bundle_unittests.cc" ,
128- " flutter_windows_engine_unittests.cc" ,
129- " string_conversion_unittests.cc" ,
130- " system_utils_unittests.cc" ,
131- " testing/engine_embedder_api_modifier.h" ,
132- " testing/mock_win32_window.cc" ,
133- " testing/mock_win32_window.h" ,
134- " testing/win32_flutter_window_test.cc" ,
135- " testing/win32_flutter_window_test.h" ,
136- " win32_dpi_utils_unittests.cc" ,
137- " win32_flutter_window_unittests.cc" ,
138- " win32_window_proc_delegate_manager_unittests.cc" ,
139- " win32_window_unittests.cc" ,
140- ]
141-
142- public_configs = [ " //flutter:config" ]
143-
144- deps = [
145- " :flutter_windows_fixtures" ,
146- " :flutter_windows_headers" ,
147- " :flutter_windows_source" ,
148- " //flutter/shell/platform/embedder:embedder_as_internal_library" ,
149- " //flutter/shell/platform/embedder:embedder_test_utils" ,
150- " //flutter/testing" ,
151- " //third_party/rapidjson" ,
152- ]
154+ if (target_os == " winuwp" ) {
155+ # disabled until the uwp implementation is present
156+ } else {
157+ executable (" flutter_windows_unittests" ) {
158+ testonly = true
159+
160+ sources = [
161+ " flutter_project_bundle_unittests.cc" ,
162+ " flutter_windows_engine_unittests.cc" ,
163+ " string_conversion_unittests.cc" ,
164+ " system_utils_unittests.cc" ,
165+ " testing/engine_embedder_api_modifier.h" ,
166+ " testing/mock_win32_window.cc" ,
167+ " testing/mock_win32_window.h" ,
168+ " testing/win32_flutter_window_test.cc" ,
169+ " testing/win32_flutter_window_test.h" ,
170+ " win32_dpi_utils_unittests.cc" ,
171+ " win32_flutter_window_unittests.cc" ,
172+ " win32_window_proc_delegate_manager_unittests.cc" ,
173+ " win32_window_unittests.cc" ,
174+ ]
175+
176+ public_configs = [ " //flutter:config" ]
177+
178+ deps = [
179+ " :flutter_windows_fixtures" ,
180+ " :flutter_windows_headers" ,
181+ " :flutter_windows_source" ,
182+ " //flutter/shell/platform/common/cpp:common_cpp" ,
183+ " //flutter/shell/platform/embedder:embedder_as_internal_library" ,
184+ " //flutter/shell/platform/embedder:embedder_test_utils" ,
185+ " //flutter/testing" ,
186+ " //third_party/rapidjson" ,
187+ ]
188+ }
153189}
154190
155191shared_library (" flutter_windows_glfw" ) {
@@ -168,11 +204,20 @@ group("windows_glfw") {
168204}
169205
170206group (" windows" ) {
171- deps = [
172- " :flutter_windows" ,
173- " :publish_headers_windows" ,
174- " //flutter/shell/platform/windows/client_wrapper:publish_wrapper_windows" ,
175- ]
207+ if (target_os == " winuwp" ) {
208+ deps = [
209+ " :flutter_windows_winuwp" ,
210+ " :publish_headers_windows" ,
211+ " //flutter/shell/platform/windows/client_wrapper:publish_wrapper_windows" ,
212+ ]
213+ } else {
214+ deps = [
215+ " :flutter_windows" ,
216+ " :publish_headers_windows" ,
217+ " //flutter/shell/platform/windows/client_wrapper:publish_wrapper_windows" ,
218+ ]
219+ }
220+
176221 if (build_glfw_shell ) {
177222 deps += [ " :windows_glfw" ]
178223 }
0 commit comments