# 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("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") import("//build/ohos.gni") import("//foundation/arkui/ace_engine/adapter/preview/build/config.gni") import("//foundation/arkui/ace_engine/build/ace_gen_obj.gni") import("//foundation/multimedia/av_session/config.gni") es2abc_gen_abc("gen_avpicker_abc") { if (use_mingw_win || use_mac || use_linux) { src_js = rebase_path("avpicker_mock.js") dst_file = rebase_path(target_out_dir + "/avpicker.abc") in_puts = [ "avpicker_mock.js" ] out_puts = [ target_out_dir + "/avpicker.abc" ] extra_args = [ "--module" ] } else { src_js = rebase_path("avpicker.js") dst_file = rebase_path(target_out_dir + "/avpicker.abc") in_puts = [ "avpicker.js" ] out_puts = [ target_out_dir + "/avpicker.abc" ] extra_args = [ "--module" ] } } gen_js_obj("avpicker_abc") { input = get_label_info(":gen_avpicker_abc", "target_out_dir") + "/avpicker.abc" output = target_out_dir + "/avpicker_abc.o" dep = ":gen_avpicker_abc" } gen_obj("avpicker_abc_preview") { input = get_label_info(":gen_avpicker_abc", "target_out_dir") + "/avpicker.abc" output = target_out_dir + "/avpicker_abc.c" snapshot_dep = [ ":gen_avpicker_abc" ] } ohos_shared_library("avcastpicker") { sources = [ "avpicker.cpp" ] sanitize = { cfi = true cfi_cross_dso = true debug = false } if (use_mingw_win || use_mac || use_linux) { deps = [ ":gen_obj_src_avpicker_abc_preview" ] } else { deps = [ ":avpicker_abc" ] } defines = [] if (use_mingw_win) { defines += [ "WINDOWS_PLATFORM" ] } else if (use_mac) { defines += [ "MAC_PLATFORM" ] } else if (use_linux) { defines += [ "LINUX_PLATFORM" ] } external_deps = [ "napi:ace_napi" ] relative_install_dir = "module/multimedia" subsystem_name = "multimedia" part_name = "av_session" } ################################################################## es2abc_gen_abc("gen_avpickerparam_abc") { if (use_mingw_win || use_mac || use_linux) { src_js = rebase_path("avpickerparam_mock.js") dst_file = rebase_path(target_out_dir + "/avpickerparam.abc") in_puts = [ "avpickerparam_mock.js" ] out_puts = [ target_out_dir + "/avpickerparam.abc" ] extra_args = [ "--module" ] } else { src_js = rebase_path("avpickerparam.js") dst_file = rebase_path(target_out_dir + "/avpickerparam.abc") in_puts = [ "avpickerparam.js" ] out_puts = [ target_out_dir + "/avpickerparam.abc" ] extra_args = [ "--module" ] } } gen_js_obj("avpickerparam_abc") { input = get_label_info(":gen_avpickerparam_abc", "target_out_dir") + "/avpickerparam.abc" output = target_out_dir + "/avpickerparam_abc.o" dep = ":gen_avpickerparam_abc" } gen_obj("avpickerparam_abc_preview") { input = get_label_info(":gen_avpickerparam_abc", "target_out_dir") + "/avpickerparam.abc" output = target_out_dir + "/avpickerparam_abc.c" snapshot_dep = [ ":gen_avpickerparam_abc" ] } ohos_shared_library("avcastpickerparam") { sources = [ "avpickerparam.cpp" ] stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true debug = false } if (use_mingw_win || use_mac || use_linux) { deps = [ ":gen_obj_src_avpickerparam_abc_preview" ] } else { deps = [ ":avpickerparam_abc" ] } defines = [] if (use_mingw_win) { defines += [ "WINDOWS_PLATFORM" ] } else if (use_mac) { defines += [ "MAC_PLATFORM" ] } else if (use_linux) { defines += [ "LINUX_PLATFORM" ] } external_deps = [ "napi:ace_napi" ] relative_install_dir = "module/multimedia" subsystem_name = "multimedia" part_name = "av_session" }