xref: /aosp_15_r20/external/pigweed/pw_blob_store/CMakeLists.txt (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://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, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16
17pw_add_library(pw_blob_store STATIC
18  HEADERS
19    public/pw_blob_store/blob_store.h
20    public/pw_blob_store/internal/metadata_format.h
21  PUBLIC_INCLUDES
22    public
23  PUBLIC_DEPS
24    pw_bytes
25    pw_containers
26    pw_kvs
27    pw_span
28    pw_status
29    pw_stream
30    pw_sync.borrow
31  PRIVATE_DEPS
32    pw_assert
33    pw_checksum
34    pw_log
35    pw_random
36    pw_string
37  SOURCES
38    blob_store.cc
39)
40
41pw_add_library(pw_blob_store.flat_file_system_entry INTERFACE
42  PUBLIC_DEPS
43    pw_blob_store
44    pw_bytes
45    pw_containers
46    pw_file.flat_file_system
47    pw_kvs
48    pw_span
49    pw_status
50    pw_stream
51    pw_sync.mutex
52  PRIVATE_DEPS
53    pw_assert
54    pw_checksum
55    pw_log
56    pw_random
57    pw_string
58)
59
60pw_add_test(pw_blob_store.blob_store_chunk_write_test
61  SOURCES
62    blob_store_chunk_write_test.cc
63  PRIVATE_DEPS
64    pw_blob_store
65  GROUPS
66    pw_blob_store
67)
68
69pw_add_test(pw_blob_store.blob_store_deferred_write_test
70  SOURCES
71    blob_store_deferred_write_test.cc
72  PRIVATE_DEPS
73    pw_blob_store
74  GROUPS
75    pw_blob_store
76)
77
78pw_add_test(pw_blob_store.flat_file_system_entry_test
79  SOURCES
80    flat_file_system_entry_test.cc
81  PRIVATE_DEPS
82    pw_blob_store
83    pw_blob_store.flat_file_system_entry
84  GROUPS
85    pw_blob_store
86)
87
88