1#
2# Copyright (C) 2019 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may not
5# use this file except in compliance with the License. You may obtain a copy of
6# the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations under
14# the License.
15#
16
17cmake_minimum_required(VERSION 3.4.1)
18
19set(native_source_path "../../../../src/native")
20set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
21
22add_library(
23  mediabenchmark_jni SHARED
24  NativeExtractor.cpp
25  NativeMuxer.cpp
26  NativeDecoder.cpp
27  NativeEncoder.cpp
28  ${native_source_path}/common/BenchmarkCommon.cpp
29  ${native_source_path}/common/Stats.cpp
30  ${native_source_path}/common/utils/Timers.cpp
31  ${native_source_path}/extractor/Extractor.cpp
32  ${native_source_path}/muxer/Muxer.cpp
33  ${native_source_path}/decoder/Decoder.cpp
34  ${native_source_path}/encoder/Encoder.cpp)
35
36include_directories(${native_source_path}/common)
37include_directories(${native_source_path}/extractor)
38include_directories(${native_source_path}/muxer)
39include_directories(${native_source_path}/decoder)
40include_directories(${native_source_path}/encoder)
41
42find_library(log-lib log)
43
44target_link_libraries(mediabenchmark_jni mediandk ${log-lib})
45