mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-12-22 06:38:44 +00:00
af29148929
Change-Id: I28a740d505c442d0480b36f2a76e533af62ab97c Signed-off-by: luwh0708 <1632083718@qq.com>
60 lines
1.9 KiB
Plaintext
60 lines
1.9 KiB
Plaintext
# Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import("//build/ohos.gni")
|
|
|
|
wmlayout_scss_gni_filepath = "//foundation/graphic/standard/utils/wmlayout"
|
|
|
|
template("wmlayout_scss") {
|
|
scss_name = invoker.scss
|
|
generate_binary_name = "${target_name}_binary"
|
|
prebuilt_etc_name = "${target_name}_etc"
|
|
|
|
scss_filename = "$root_gen_dir/${target_name}"
|
|
action(generate_binary_name) {
|
|
script = "$wmlayout_scss_gni_filepath/gen_scss.py"
|
|
inputs = [
|
|
script,
|
|
scss_name,
|
|
]
|
|
outputs = [ scss_filename ]
|
|
label = "//foundation/graphic/standard/frameworks/wmserver/src/wmlayout_scss_parser:wmlayout_scss_parser($host_toolchain)"
|
|
deps = [ label ]
|
|
args = [
|
|
"--cmd",
|
|
"./" +
|
|
rebase_path(get_label_info(label, "root_out_dir"), root_build_dir) +
|
|
"/graphic/graphic_standard/wmlayout_scss_parser",
|
|
"--input",
|
|
rebase_path(scss_name, root_build_dir),
|
|
"--output",
|
|
rebase_path(scss_filename, root_build_dir),
|
|
]
|
|
}
|
|
|
|
ohos_prebuilt_etc(prebuilt_etc_name) {
|
|
forward_variables_from(invoker,
|
|
[
|
|
"part_name",
|
|
"subsystem_name",
|
|
])
|
|
source = scss_filename
|
|
relative_install_dir = "wmlayout.d"
|
|
deps = [ ":${generate_binary_name}" ]
|
|
}
|
|
|
|
group(target_name) {
|
|
public_deps = [ ":${prebuilt_etc_name}" ]
|
|
}
|
|
}
|