blob: 849e1309f83f91d481f948857802989a92634ca6 [file] [log] [blame]
# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The "common" target contains facilities provided by Starboard that are common
# to all platforms.
# This must be a static_library, not a source_set. When using a source_set, we
# see duplicate definition errors when compiling new.cc because of our
# overloaded operators.
source_set("common_headers_only") {
sources = [ "log.h" ]
deps = [ "//starboard:starboard_headers_only" ]
}
static_library("common") {
check_includes = false
public_deps = [
":common_headers_only",
"//starboard:starboard_headers_only",
]
sources = [
"//starboard/shared/media_session/playback_state.cc",
"//starboard/shared/media_session/playback_state.h",
"allocator.cc",
"allocator.h",
"common.cc",
"condition_variable.cc",
"condition_variable.h",
"configuration_defaults.cc",
"configuration_defaults.h",
"device_type.cc",
"device_type.h",
"experimental/concurrency_debug.cc",
"experimental/concurrency_debug.h",
"file.cc",
"file.h",
"fixed_no_free_allocator.cc",
"fixed_no_free_allocator.h",
"flat_map.h",
"locked_ptr.h",
"log.cc",
"media.cc",
"media.h",
"metrics/stats_tracker.cc",
"metrics/stats_tracker.h",
"move.h",
"murmurhash2.cc",
"murmurhash2.h",
"mutex.cc",
"mutex.h",
"new.cc",
"optional.cc",
"optional.h",
"paths.cc",
"paths.h",
"player.cc",
"player.h",
"pointer_arithmetic.h",
"process.cc",
"process.h",
"queue.h",
"recursive_mutex.cc",
"recursive_mutex.h",
"ref_counted.cc",
"ref_counted.h",
"reset_and_return.h",
"reuse_allocator_base.cc",
"reuse_allocator_base.h",
"rwlock.cc",
"rwlock.h",
"scoped_ptr.h",
"semaphore.cc",
"semaphore.h",
"socket.cc",
"socket.h",
"spin_lock.cc",
"spin_lock.h",
"state_machine.cc",
"state_machine.h",
"storage.cc",
"storage.h",
"string.h",
"system_property.h",
"thread.cc",
"thread.h",
"thread_collision_warner.cc",
"thread_collision_warner.h",
"time.cc",
"time.h",
]
}
target(gtest_target_type, "common_test") {
testonly = true
sources = [
"fixed_no_free_allocator_test.cc",
"media_test.cc",
"memory_test.cc",
"player_test.cc",
"socket_test.cc",
"test_main.cc",
]
deps = [
":common",
"//testing/gmock",
"//testing/gtest",
]
}