blob: 1c00b590e4475005d2e6fe24f97e6972d6c3fd44 [file] [log] [blame]
Tom Fineganf0d14442017-03-01 20:42:51 -08001##
2## Copyright (c) 2017, Alliance for Open Media. All rights reserved
3##
4## This source code is subject to the terms of the BSD 2 Clause License and
5## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6## was not distributed with this source code in the LICENSE file, you can
7## obtain it at www.aomedia.org/license/software. If the Alliance for Open
8## Media Patent License 1.0 was not distributed with this source code in the
9## PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10##
Tom Finegan17ccaec2017-05-25 17:47:42 -070011if (NOT AOM_AOM_SCALE_AOM_SCALE_CMAKE_)
12set(AOM_AOM_SCALE_AOM_SCALE_CMAKE_ 1)
13
Tom Fineganf0d14442017-03-01 20:42:51 -080014set(AOM_SCALE_SOURCES
15 "${AOM_ROOT}/aom_scale/aom_scale.h"
16 "${AOM_ROOT}/aom_scale/generic/aom_scale.c"
17 "${AOM_ROOT}/aom_scale/generic/gen_scalers.c"
18 "${AOM_ROOT}/aom_scale/generic/yv12config.c"
19 "${AOM_ROOT}/aom_scale/generic/yv12extend.c"
20 "${AOM_ROOT}/aom_scale/yv12config.h")
21
Tom Finegand148c962017-04-04 14:48:26 -070022set(AOM_SCALE_INTRIN_DSPR2
23 "${AOM_ROOT}/aom_scale/mips/dspr2/yv12extend_dspr2.c")
24
Tom Fineganf0d14442017-03-01 20:42:51 -080025# Creates the aom_scale build target and makes libaom depend on it. The libaom
26# target must exist before this function is called.
27function (setup_aom_scale_targets)
Tom Finegan78516fc2017-06-20 10:46:26 -070028 add_library(aom_scale OBJECT ${AOM_SCALE_SOURCES})
29 target_sources(aom PRIVATE $<TARGET_OBJECTS:aom_scale>)
Tom Finegand148c962017-04-04 14:48:26 -070030
31 if (HAVE_DSPR2)
32 add_intrinsics_object_library("" "dspr2" "aom_scale"
Tom Finegandb724cf2017-09-12 13:56:39 -070033 "AOM_SCALE_INTRIN_DSPR2" "aom")
Tom Finegand148c962017-04-04 14:48:26 -070034 endif ()
35
36 set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_scale PARENT_SCOPE)
Tom Fineganf0d14442017-03-01 20:42:51 -080037endfunction ()
Tom Finegan17ccaec2017-05-25 17:47:42 -070038
39endif () # AOM_AOM_SCALE_AOM_SCALE_CMAKE_