blob: 144d773e31eb441fe90dc3b5e02b774fc0aa4bd5 [file] [log] [blame]
Tom Fineganb7d02542017-03-01 21:14:28 -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_UTIL_AOM_UTIL_CMAKE_)
12set(AOM_AOM_UTIL_AOM_UTIL_CMAKE_ 1)
13
Tom Fineganb7d02542017-03-01 21:14:28 -080014set(AOM_UTIL_SOURCES
15 "${AOM_ROOT}/aom_util/aom_thread.c"
16 "${AOM_ROOT}/aom_util/aom_thread.h"
17 "${AOM_ROOT}/aom_util/endian_inl.h")
18
19if (CONFIG_BITSTREAM_DEBUG)
20 set(AOM_UTIL_SOURCES
21 ${AOM_UTIL_SOURCES}
22 "${AOM_ROOT}/aom_util/debug_util.c"
23 "${AOM_ROOT}/aom_util/debug_util.h")
24endif ()
25
26# Creates the aom_util build target and makes libaom depend on it. The libaom
27# target must exist before this function is called.
28function (setup_aom_util_targets)
Tom Finegan78516fc2017-06-20 10:46:26 -070029 add_library(aom_util OBJECT ${AOM_UTIL_SOURCES})
Tom Fineganb7d02542017-03-01 21:14:28 -080030 set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_util PARENT_SCOPE)
Tom Finegan78516fc2017-06-20 10:46:26 -070031 target_sources(aom PRIVATE $<TARGET_OBJECTS:aom_util>)
Tom Fineganb7d02542017-03-01 21:14:28 -080032endfunction ()
Tom Finegan17ccaec2017-05-25 17:47:42 -070033
34endif () # AOM_AOM_UTIL_AOM_UTIL_CMAKE_