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_varint STATIC 18 HEADERS 19 public/pw_varint/varint.h 20 PUBLIC_INCLUDES 21 public 22 PUBLIC_DEPS 23 pw_polyfill 24 pw_preprocessor 25 pw_span 26 SOURCES 27 varint.cc 28) 29if(Zephyr_FOUND AND CONFIG_PIGWEED_VARINT) 30 zephyr_link_libraries(pw_varint) 31endif() 32 33pw_add_library(pw_varint.stream STATIC 34 HEADERS 35 public/pw_varint/stream.h 36 PUBLIC_INCLUDES 37 public 38 PUBLIC_DEPS 39 pw_status 40 pw_stream 41 SOURCES 42 stream.cc 43 PRIVATE_DEPS 44 pw_varint 45) 46 47pw_add_test(pw_varint.varint_test 48 SOURCES 49 varint_test.cc 50 varint_test_c.c 51 PRIVATE_DEPS 52 pw_varint 53 GROUPS 54 modules 55 pw_varint 56) 57 58pw_add_test(pw_varint.stream_test 59 SOURCES 60 stream_test.cc 61 PRIVATE_DEPS 62 pw_stream 63 pw_varint.stream 64 GROUPS 65 modules 66 pw_varint 67) 68