xref: /aosp_15_r20/external/pigweed/pw_chrono_freertos/CMakeLists.txt (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2022 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_module_config(pw_chrono_freertos_CONFIG)
18
19pw_add_library(pw_chrono_freertos.config INTERFACE
20  HEADERS
21    public/pw_chrono_freertos/config.h
22  PUBLIC_INCLUDES
23    public
24  PUBLIC_DEPS
25    pw_polyfill
26    pw_third_party.freertos
27    ${pw_chrono_freertos_CONFIG}
28)
29
30# This target provides the backend for pw::chrono::SystemClock.
31pw_add_library(pw_chrono_freertos.system_clock STATIC
32  HEADERS
33    public/pw_chrono_freertos/system_clock_config.h
34    public/pw_chrono_freertos/system_clock_constants.h
35    public_overrides/pw_chrono_backend/system_clock_config.h
36  PUBLIC_INCLUDES
37    public
38    public_overrides
39  PUBLIC_DEPS
40    pw_chrono.epoch
41    pw_chrono.system_clock.facade
42    pw_chrono_freertos.config
43    pw_third_party.freertos
44  SOURCES
45    system_clock.cc
46  PRIVATE_DEPS
47    pw_interrupt.context
48    pw_sync.interrupt_spin_lock
49)
50
51# This target provides the backend for pw::chrono::SystemTimer.
52pw_add_library(pw_chrono_freertos.system_timer STATIC
53  HEADERS
54    public/pw_chrono_freertos/system_timer_inline.h
55    public/pw_chrono_freertos/system_timer_native.h
56    public_overrides/pw_chrono_backend/system_timer_inline.h
57    public_overrides/pw_chrono_backend/system_timer_native.h
58  PUBLIC_INCLUDES
59    public
60    public_overrides
61  PUBLIC_DEPS
62    pw_chrono.system_clock
63    pw_chrono.system_timer.facade
64    pw_third_party.freertos
65  SOURCES
66    system_timer.cc
67  PRIVATE_DEPS
68    pw_assert
69    pw_chrono_freertos.system_clock
70)
71