1# Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/lite/config/component/lite_component.gni") 15 16lite_component("hi3516dv300_histreaming_server") { 17 features = [ ":ohos_histreaming_server" ] 18} 19 20need_link_mpp_lib = true 21if (need_link_mpp_lib) { 22 mpp_lib_path = "//device/soc/hisilicon/hi3516dv300/sdk_linux/out" 23} 24 25executable("ohos_histreaming_server") { 26 output_name = "ohos_histreaming_server" 27 sources = [ "src/histreaming_client_server.c" ] 28 29 include_dirs = [ 30 "include", 31 "//third_party/cJSON", 32 "//third_party/libcoap/include/coap2", 33 "//third_party/libcoap/", 34 "//third_party/libcoap/include", 35 ] 36 37 deps = [ "//third_party/libcoap:libcoap_static" ] 38 39 defines = [ 40 "_PLATFORM_LINUX", 41 "WITH_POSIX", 42 ] 43 44 if (need_link_mpp_lib) { 45 outdir = rebase_path("$mpp_lib_path/lib") 46 ldflags = [ "-L$outdir" ] 47 ldflags += [ "-lsecurec" ] 48 ldflags += [ "-lcjson_shared" ] 49 histreaming_lib_dir = rebase_path( 50 "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/taurus/histreaming_server/lib") 51 ldflags += [ "-L$histreaming_lib_dir" ] 52 ldflags += [ "-lhistreaminglink" ] 53 } 54} 55