# Copyright (c) 2023 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") # NOSORT import("../../../camera.gni") # NOSORT import("//build/config/components/hdi/hdi.gni") import("$hdf_fwk_path/tools/hc-gen/hc_gen.gni") import("../camera_usb.gni") hc_gen_c("generate_source") { sources = [ "./pipeline_core/config.hcs", "./pipeline_core/params.hcs", ] } action("copy_source") { script = "/usr/bin/env" outputs = [ "$target_out_dir/tmp.c" ] # no use, just for gn complains args = [ "cp", "-f", ] args += rebase_path(get_target_outputs(":generate_source")) args += [ rebase_path( "$camera_path_usb/pipeline_core/pipeline_impl/src/strategy/config/") ] deps = [ ":generate_source" ] } ohos_prebuilt_etc("config.c") { deps = [ ":copy_source" ] source = "$camera_path_usb/pipeline_core/pipeline_impl/src/strategy/config/config.c" exec_script( "/usr/bin/env", [ "touch", rebase_path( "$camera_path_usb/pipeline_core/pipeline_impl/src/strategy/config/config.c"), ]) subsystem_name = "hdf" part_name = "drivers_peripheral_camera" } ohos_prebuilt_etc("params.c") { deps = [ ":copy_source" ] source = "$camera_path_usb/pipeline_core/pipeline_impl/src/strategy/config/params.c" exec_script( "/usr/bin/env", [ "touch", rebase_path( "$camera_path_usb/pipeline_core/pipeline_impl/src/strategy/config/params.c"), ]) subsystem_name = "hdf" part_name = "drivers_peripheral_camera" } hc_gen("build_ipp_algo_config") { sources = [ rebase_path("./pipeline_core/ipp_algo_config.hcs") ] } ohos_prebuilt_etc("ipp_algo_config.hcb") { deps = [ ":build_ipp_algo_config" ] hcs_outputs = get_target_outputs(":build_ipp_algo_config") source = hcs_outputs[0] relative_install_dir = "hdfconfig" install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_camera" } config("example_config") { visibility = [ ":*" ] cflags = [ "-Wno-error", "-Wno-unused-function", "-Wno-unused-parameter", ] } group("chipset_build") { public_deps = [ ":config.c", ":ipp_algo_config.hcb", ":params.c", "$camera_path_usb/adapter/platform/v4l2/src/driver_adapter:usb_camera_v4l2_adapter", ] }