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 20if(NOT LIBGAV1_ENABLE_EXAMPLES) 21 macro(libgav1_add_examples_targets) 22 23 endmacro() 24 return() 25endif() 26 27set(libgav1_file_reader_sources "${libgav1_examples}/file_reader.cc" 28 "${libgav1_examples}/file_reader.h" 29 "${libgav1_examples}/file_reader_constants.cc" 30 "${libgav1_examples}/file_reader_constants.h" 31 "${libgav1_examples}/file_reader_factory.cc" 32 "${libgav1_examples}/file_reader_factory.h" 33 "${libgav1_examples}/file_reader_interface.h" 34 "${libgav1_examples}/ivf_parser.cc" 35 "${libgav1_examples}/ivf_parser.h" 36 "${libgav1_examples}/logging.h") 37 38set(libgav1_file_writer_sources "${libgav1_examples}/file_writer.cc" 39 "${libgav1_examples}/file_writer.h" 40 "${libgav1_examples}/logging.h") 41 42set(libgav1_decode_sources "${libgav1_examples}/gav1_decode.cc") 43 44macro(libgav1_add_examples_targets) 45 libgav1_add_library(NAME libgav1_file_reader TYPE OBJECT SOURCES 46 ${libgav1_file_reader_sources} DEFINES ${libgav1_defines} 47 INCLUDES ${libgav1_include_paths}) 48 49 libgav1_add_library(NAME libgav1_file_writer TYPE OBJECT SOURCES 50 ${libgav1_file_writer_sources} DEFINES ${libgav1_defines} 51 INCLUDES ${libgav1_include_paths}) 52 53 libgav1_add_executable(NAME 54 gav1_decode 55 SOURCES 56 ${libgav1_decode_sources} 57 DEFINES 58 ${libgav1_defines} 59 INCLUDES 60 ${libgav1_include_paths} 61 ${libgav1_gtest_include_paths} 62 OBJLIB_DEPS 63 libgav1_file_reader 64 libgav1_file_writer 65 LIB_DEPS 66 absl::strings 67 absl::str_format_internal 68 absl::time 69 ${libgav1_dependency}) 70endmacro() 71