1# Copyright 2023 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 17# Add library linkage for Zephyr 18pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_BASE64 pw_base64) 19pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_BYTES pw_bytes) 20pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_CHECKSUM pw_checksum) 21pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_CONTAINERS pw_containers) 22pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_DIGITAL_IO pw_digital_io) 23pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_FUNCTION pw_function) 24pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_HDLC_RPC pw_hdlc.default_addresses pw_hdlc.encoder pw_hdlc.decoder ) 25pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_MULTISINK pw_multisink) 26pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_MULTISINK_UTIL pw_multisink.util) 27pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_PREPROCESSOR pw_preprocessor) 28pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_POLYFILL pw_polyfill) 29pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RESULT pw_result) 30pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_ROUTER_EGRESS pw_router.egress) 31pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_ROUTER_EGRESS_FUNCTION pw_router.egress_function) 32pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_ROUTER_PACKET_PARSER pw_router.packet_parser) 33pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_ROUTER_STATIC_ROUTER pw_router.static_router) 34pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_CLIENT pw_rpc.client) 35pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_CLIENT_SERVER pw_rpc.client_server) 36pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_COMMON pw_rpc.common) 37pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_SERVER pw_rpc.server) 38pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_NANOPB_CLIENT pw_rpc.nanopb.client_api) 39pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_NANOPB_COMMON pw_rpc.nanopb.common) 40pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_NANOPB_ECHO_SERVICE pw_rpc.nanopb.echo_service) 41pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_NANOPB_METHOD pw_rpc.nanopb.method) 42pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_RPC_NANOPB_METHOD_UNION pw_rpc.nanopb.method_union) 43pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_SPAN pw_span) 44pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_STATUS pw_status) 45pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_STREAM pw_stream) 46pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_STRING pw_string) 47pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_SYS_IO pw_sys_io) 48pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_THREAD_SLEEP pw_thread.sleep) 49pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_TOKENIZER pw_tokenizer) 50pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_TOKENIZER_BASE64 pw_tokenizer.base64) 51pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_DETOKENIZER pw_tokenizer.decoder) 52pw_zephyrize_libraries_ifdef(CONFIG_PIGWEED_VARINT pw_varint) 53 54# Set Pigweed configs from Kconfig 55pw_set_config_from_zephyr(CONFIG_PIGWEED_MULTISINK_LOCK_INTERRUPT_SAFE PW_MULTISINK_CONFIG_LOCK_INTERRUPT_SAFE) 56 57# Add test libraries 58if(CONFIG_TEST) 59target_link_libraries_ifdef(CONFIG_PIGWEED_BASE64 app PRIVATE pw_base64.base64_test.lib) 60endif(CONFIG_TEST) 61