Skip to content

Commit 3bc1f33

Browse files
committed
Allow building targets that do not create metal shaders on all platforms. (flutter#133)
1 parent 1a055b0 commit 3bc1f33

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

impeller/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ config("impeller_public_config") {
1212
if (impeller_supports_platform) {
1313
defines += [ "IMPELLER_SUPPORTS_PLATFORM=1" ]
1414
}
15+
16+
if (is_win) {
17+
defines += [ "_USE_MATH_DEFINES" ]
18+
}
1519
}
1620

1721
group("impeller") {

impeller/tessellator/BUILD.gn

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ impeller_component("tessellator") {
1515
deps = [ "//third_party/libtess2" ]
1616
}
1717

18-
shared_library("tessellator_shared") {
19-
output_name = "tessellator"
18+
impeller_component("tessellator_shared") {
19+
target_type = "shared_library"
20+
if (is_win) {
21+
output_name = "libtessellator"
22+
} else {
23+
output_name = "tessellator"
24+
}
25+
2026

2127
sources = [
2228
"c/tessellator.h",

impeller/tools/impeller.gni

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ declare_args() {
1010
impeller_enable_playground = false
1111

1212
# Whether Impeller is supported on the platform.
13-
impeller_supports_platform = is_mac || is_ios
13+
impeller_supports_platform = true
14+
15+
# Whether Impeller shaders are supported on the platform.
16+
impeller_shaders_supports_platform = is_mac || is_ios
1417
}
1518

1619
# ------------------------------------------------------------------------------
@@ -289,7 +292,7 @@ template("impeller_shaders_real") {
289292
# @see impeller_shaders_real
290293
#
291294
template("impeller_shaders") {
292-
if (impeller_supports_platform) {
295+
if (impeller_shaders_supports_platform) {
293296
impeller_shaders_real(target_name) {
294297
forward_variables_from(invoker, "*")
295298
}

0 commit comments

Comments
 (0)