1# Copyright (C) 2024 Huawei Device Co., Ltd.
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/test.gni")
15import("//foundation/multimedia/media_foundation/config.gni")
16
17module_output_path = "media_foundation/unittest"
18
19group("detail_enhancer_image_ndk_unit_test") {
20  testonly = true
21  deps = [ ":detail_enhancer_image_ndk_inner_unit_test" ]
22}
23
24#################################################################################################################
25detail_enhancer_image_ndk_unit_test_cflags = [
26  "-std=c++17",
27  "-fno-rtti",
28  "-fexceptions",
29  "-Wall",
30  "-fno-common",
31  "-fstack-protector-strong",
32  "-Wshadow",
33  "-FPIC",
34  "-FS",
35  "-O2",
36  "-D_FORTIFY_SOURCE=2",
37  "-fvisibility=hidden",
38  "-Wformat=2",
39  "-Wdate-time",
40  "-Wextra",
41  "-Wimplicit-fallthrough",
42  "-Wsign-compare",
43  "-Dprivate=public",
44  "-Dprotected=public",
45]
46
47ohos_unittest("detail_enhancer_image_ndk_inner_unit_test") {
48  module_out_path = module_output_path
49
50  sanitize = {
51    cfi = true
52    cfi_cross_dso = true
53    debug = false
54  }
55
56  include_dirs = [
57    "$histreamer_root_dir/video_processing_engine/interface/kits/c",
58    "$histreamer_root_dir/video_processing_engine/interface/inner_api",
59    "$histreamer_root_dir/video_processing_engine/framework/dfx/include",
60    "$histreamer_root_dir/video_processing_engine/framework/capi/image_processing/include",
61    "$histreamer_root_dir/video_processing_engine/framework/algorithm/include",
62    "$multimedia_root_dir/image_framework/interfaces/kits/native/include/image",
63  ]
64
65  sources = [ "./detail_enhancer_image_ndk_unit_test.cpp" ]
66
67  cflags = detail_enhancer_image_ndk_unit_test_cflags
68
69  defines = []
70
71  deps = [
72    "$histreamer_root_dir/interface/kits/ndk/core:libnative_media_core",
73    "$histreamer_root_dir/src:media_foundation",
74    "$histreamer_root_dir/video_processing_engine/framework:image_processing",
75    "$histreamer_root_dir/video_processing_engine/interface/kits/c/image_processing:libimage_processing_ndk",
76  ]
77
78  external_deps = [
79    "graphic_2d:2d_graphics",
80    "graphic_surface:surface",
81    "hilog:libhilog",
82    "hitrace:hitrace_meter",
83    "image_framework:pixelmap",
84    "media_foundation:native_media_core",
85  ]
86
87  if (has_skia) {
88    defines += [ "SKIA_ENABLE" ]
89  }
90}
91