From 688f8036f03fbcc1d6124dfc1e64c123cb78e133 Mon Sep 17 00:00:00 2001 From: Ewout van Bekkum Date: Fri, 10 Jun 2022 12:15:18 -0700 Subject: [PATCH] pw_sys_io: Improve CMake support Change-Id: I947f00449a836481aaaa8919e1a6bad00542cca7 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/97744 Pigweed-Auto-Submit: Ewout van Bekkum Reviewed-by: Wyatt Hepler Commit-Queue: Ewout van Bekkum --- pw_sys_io/CMakeLists.txt | 13 +++++++++++-- pw_sys_io_stdio/CMakeLists.txt | 9 ++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/pw_sys_io/CMakeLists.txt b/pw_sys_io/CMakeLists.txt index ee69592ec2..558801f627 100644 --- a/pw_sys_io/CMakeLists.txt +++ b/pw_sys_io/CMakeLists.txt @@ -15,9 +15,18 @@ include($ENV{PW_ROOT}/pw_build/pigweed.cmake) pw_add_facade(pw_sys_io + HEADERS + public/pw_sys_io/sys_io.h + PUBLIC_INCLUDES + public + PUBLIC_DEPS + pw_status + pw_polyfill.span +) + +pw_add_module_library(pw_sys_io.default_putget_bytes SOURCES sys_io.cc PUBLIC_DEPS - pw_span - pw_status + pw_sys_io.facade ) diff --git a/pw_sys_io_stdio/CMakeLists.txt b/pw_sys_io_stdio/CMakeLists.txt index 1493cf7627..66987ad181 100644 --- a/pw_sys_io_stdio/CMakeLists.txt +++ b/pw_sys_io_stdio/CMakeLists.txt @@ -14,7 +14,10 @@ include($ENV{PW_ROOT}/pw_build/pigweed.cmake) -pw_auto_add_simple_module(pw_sys_io_stdio - IMPLEMENTS_FACADE - pw_sys_io +pw_add_module_library(pw_sys_io_stdio + SOURCES + sys_io.cc + PRIVATE_DEPS + pw_sys_io.default_putget_bytes + pw_sys_io.facade )