Allow building targets that do not create metal shaders on all platforms. (flutter/engine#133)
This commit is contained in:
@@ -12,6 +12,10 @@ config("impeller_public_config") {
|
||||
if (impeller_supports_platform) {
|
||||
defines += [ "IMPELLER_SUPPORTS_PLATFORM=1" ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
defines += [ "_USE_MATH_DEFINES" ]
|
||||
}
|
||||
}
|
||||
|
||||
group("impeller") {
|
||||
|
||||
@@ -15,8 +15,14 @@ impeller_component("tessellator") {
|
||||
deps = [ "//third_party/libtess2" ]
|
||||
}
|
||||
|
||||
shared_library("tessellator_shared") {
|
||||
output_name = "tessellator"
|
||||
impeller_component("tessellator_shared") {
|
||||
target_type = "shared_library"
|
||||
if (is_win) {
|
||||
output_name = "libtessellator"
|
||||
} else {
|
||||
output_name = "tessellator"
|
||||
}
|
||||
|
||||
|
||||
sources = [
|
||||
"c/tessellator.h",
|
||||
|
||||
@@ -10,7 +10,10 @@ declare_args() {
|
||||
impeller_enable_playground = false
|
||||
|
||||
# Whether Impeller is supported on the platform.
|
||||
impeller_supports_platform = is_mac || is_ios
|
||||
impeller_supports_platform = true
|
||||
|
||||
# Whether Impeller shaders are supported on the platform.
|
||||
impeller_shaders_supports_platform = is_mac || is_ios
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -289,7 +292,7 @@ template("impeller_shaders_real") {
|
||||
# @see impeller_shaders_real
|
||||
#
|
||||
template("impeller_shaders") {
|
||||
if (impeller_supports_platform) {
|
||||
if (impeller_shaders_supports_platform) {
|
||||
impeller_shaders_real(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user