diff --git a/middleware/BUILD.gn b/middleware/BUILD.gn index fe4a0fc7d357f6d80d650c404271330d06105ac6..939c4abf35c7e65199a0e587a440ae8effb86be9 100755 --- a/middleware/BUILD.gn +++ b/middleware/BUILD.gn @@ -1,20 +1,91 @@ -# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. +# Copyright (c) Hisilicon Technologies Co., Ltd. 2021-2021. All rights reserved. -import("//build/lite/config/component/lite_component.gni") - -if (board_name == "hi3516dv300" || board_name == "hispark_taurus" || - board_name == "aegis_hi3516dv300") { - board = "hi3516dv300" -} else if (board_name == "hi3518ev300" || board_name == "hispark_aries") { - board = "hi3518ev300" +if (defined(ohos_lite)) { + import("//build/lite/config/component/lite_component.gni") +} else { + import("//build/ohos.gni") } -build_ext_component("middleware_source_sdk") { - exec_path = rebase_path(".", root_build_dir) - outdir = rebase_path("$root_out_dir") - clang_dir = "" - if (ohos_build_compiler_dir != "") { - clang_dir = rebase_path("${ohos_build_compiler_dir}/bin") - } - command = "./build.sh ${outdir} ${board} ${ohos_kernel_type} ${ohos_build_compiler} ${storage_type} ${clang_dir}" +if (defined(ohos_lite)) { + if (board_name == "hi3516dv300" || board_name == "hispark_taurus" || + board_name == "aegis_hi3516dv300") { + board = "hi3516dv300" + } else if (board_name == "hi3518ev300" || board_name == "hispark_aries") { + board = "hi3518ev300" + } + + build_ext_component("middleware_source_sdk") { + exec_path = rebase_path(".", root_build_dir) + outdir = rebase_path("$root_out_dir") + clang_dir = "" + if (ohos_build_compiler_dir != "") { + clang_dir = rebase_path("${ohos_build_compiler_dir}/bin") + } + command = "./build.sh ${outdir} ${board} ${ohos_kernel_type} ${ohos_build_compiler} ${storage_type} ${clang_dir}" + } +} else { + group("middleware_group") { + deps = [ + ":hitimer", + ":mbuf", + ":messagehandler", + ":mwlog", + ":dtcf", + ":recorder_pro", + ":exif", + ":fileformat", + ":mp4", + ":ts", + ] + } + ohos_prebuilt_shared_library("hitimer") { + source = "source/common/hitimer/lib/ext/libhitimer.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("mbuf") { + source = "source/common/mbuffer/lib/ext/libmbuf.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("messagehandler") { + source = "source/common/msghandler/lib/ext/libmessagehandler.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("mwlog") { + source = "source/common/log/lib/ext/libmwlog.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("dtcf") { + source = "source/component/dtcf/lib/ext/libdtcf.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("recorder_pro") { + source = "source/component/recorder_pro/lib/ext/librecorder_pro.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("exif") { + source = "source/component/fileformat/exif/lib/ext/libexif.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("fileformat") { + source = "source/component/fileformat/common/lib/ext/libfileformat.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("mp4") { + source = "source/component/fileformat/mp4/lib/ext/libmp4.so" + subsystem_name = "hisilicon_products" + } + + ohos_prebuilt_shared_library("ts") { + source = "source/component/fileformat/ts/lib/ext/libts.so" + subsystem_name = "hisilicon_products" + } + }