Tom Finegan | f0d1444 | 2017-03-01 20:42:51 -0800 | [diff] [blame] | 1 | ## |
| 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 Finegan | 17ccaec | 2017-05-25 17:47:42 -0700 | [diff] [blame] | 11 | if (NOT AOM_AOM_SCALE_AOM_SCALE_CMAKE_) |
| 12 | set(AOM_AOM_SCALE_AOM_SCALE_CMAKE_ 1) |
| 13 | |
Tom Finegan | f0d1444 | 2017-03-01 20:42:51 -0800 | [diff] [blame] | 14 | set(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 Finegan | d148c96 | 2017-04-04 14:48:26 -0700 | [diff] [blame] | 22 | set(AOM_SCALE_INTRIN_DSPR2 |
| 23 | "${AOM_ROOT}/aom_scale/mips/dspr2/yv12extend_dspr2.c") |
| 24 | |
Tom Finegan | f0d1444 | 2017-03-01 20:42:51 -0800 | [diff] [blame] | 25 | # Creates the aom_scale build target and makes libaom depend on it. The libaom |
| 26 | # target must exist before this function is called. |
| 27 | function (setup_aom_scale_targets) |
Tom Finegan | 78516fc | 2017-06-20 10:46:26 -0700 | [diff] [blame] | 28 | add_library(aom_scale OBJECT ${AOM_SCALE_SOURCES}) |
| 29 | target_sources(aom PRIVATE $<TARGET_OBJECTS:aom_scale>) |
Tom Finegan | d148c96 | 2017-04-04 14:48:26 -0700 | [diff] [blame] | 30 | |
| 31 | if (HAVE_DSPR2) |
| 32 | add_intrinsics_object_library("" "dspr2" "aom_scale" |
Tom Finegan | db724cf | 2017-09-12 13:56:39 -0700 | [diff] [blame] | 33 | "AOM_SCALE_INTRIN_DSPR2" "aom") |
Tom Finegan | d148c96 | 2017-04-04 14:48:26 -0700 | [diff] [blame] | 34 | endif () |
| 35 | |
| 36 | set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_scale PARENT_SCOPE) |
Tom Finegan | f0d1444 | 2017-03-01 20:42:51 -0800 | [diff] [blame] | 37 | endfunction () |
Tom Finegan | 17ccaec | 2017-05-25 17:47:42 -0700 | [diff] [blame] | 38 | |
| 39 | endif () # AOM_AOM_SCALE_AOM_SCALE_CMAKE_ |