• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The libgav1 Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15if(LIBGAV1_EXAMPLES_LIBGAV1_EXAMPLES_CMAKE_)
16  return()
17endif() # LIBGAV1_EXAMPLES_LIBGAV1_EXAMPLES_CMAKE_
18set(LIBGAV1_EXAMPLES_LIBGAV1_EXAMPLES_CMAKE_ 1)
19
20set(libgav1_file_reader_sources "${libgav1_examples}/file_reader.cc"
21                                "${libgav1_examples}/file_reader.h"
22                                "${libgav1_examples}/file_reader_constants.cc"
23                                "${libgav1_examples}/file_reader_constants.h"
24                                "${libgav1_examples}/file_reader_factory.cc"
25                                "${libgav1_examples}/file_reader_factory.h"
26                                "${libgav1_examples}/file_reader_interface.h"
27                                "${libgav1_examples}/ivf_parser.cc"
28                                "${libgav1_examples}/ivf_parser.h"
29                                "${libgav1_examples}/logging.h")
30
31set(libgav1_file_writer_sources "${libgav1_examples}/file_writer.cc"
32                                "${libgav1_examples}/file_writer.h"
33                                "${libgav1_examples}/logging.h")
34
35set(libgav1_decode_sources "${libgav1_examples}/gav1_decode.cc")
36
37macro(libgav1_add_examples_targets)
38  libgav1_add_library(NAME libgav1_file_reader TYPE OBJECT SOURCES
39                      ${libgav1_file_reader_sources} DEFINES ${libgav1_defines}
40                      INCLUDES ${libgav1_include_paths})
41
42  libgav1_add_library(NAME libgav1_file_writer TYPE OBJECT SOURCES
43                      ${libgav1_file_writer_sources} DEFINES ${libgav1_defines}
44                      INCLUDES ${libgav1_include_paths})
45
46  libgav1_add_executable(NAME
47                         gav1_decode
48                         SOURCES
49                         ${libgav1_decode_sources}
50                         DEFINES
51                         ${libgav1_defines}
52                         INCLUDES
53                         ${libgav1_include_paths}
54                         ${libgav1_gtest_include_paths}
55                         OBJLIB_DEPS
56                         libgav1_file_reader
57                         libgav1_file_writer
58                         LIB_DEPS
59                         absl::strings
60                         absl::str_format_internal
61                         absl::time
62                         ${libgav1_dependency})
63endmacro()
64