Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 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 | |
| 15 | project(Pigweed) |
| 16 | |
Wyatt Hepler | 0a6f763 | 2020-10-29 09:08:19 -0700 | [diff] [blame] | 17 | cmake_minimum_required(VERSION 3.16) |
Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 18 | |
Wyatt Hepler | 1e1d481 | 2021-01-21 15:46:13 -0800 | [diff] [blame] | 19 | # The PW_ROOT environment variable should be set in bootstrap. If it is not set, |
| 20 | # set it to this directory. |
| 21 | if("$ENV{PW_ROOT}" STREQUAL "") |
| 22 | message("The PW_ROOT environment variable is not set; " |
| 23 | "using ${CMAKE_CURRENT_LIST_DIR} within CMake") |
| 24 | set(ENV{PW_ROOT} "${CMAKE_CURRENT_LIST_DIR}") |
| 25 | endif() |
| 26 | |
Wyatt Hepler | a9e249d | 2020-11-18 09:40:49 -0800 | [diff] [blame] | 27 | add_subdirectory(pw_assert EXCLUDE_FROM_ALL) |
| 28 | add_subdirectory(pw_assert_basic EXCLUDE_FROM_ALL) |
| 29 | add_subdirectory(pw_assert_log EXCLUDE_FROM_ALL) |
| 30 | add_subdirectory(pw_base64 EXCLUDE_FROM_ALL) |
| 31 | add_subdirectory(pw_blob_store EXCLUDE_FROM_ALL) |
| 32 | add_subdirectory(pw_build EXCLUDE_FROM_ALL) |
| 33 | add_subdirectory(pw_bytes EXCLUDE_FROM_ALL) |
| 34 | add_subdirectory(pw_checksum EXCLUDE_FROM_ALL) |
Alexei Frolov | e39af8d | 2020-12-30 14:55:09 -0800 | [diff] [blame] | 35 | add_subdirectory(pw_chrono EXCLUDE_FROM_ALL) |
| 36 | add_subdirectory(pw_chrono_stl EXCLUDE_FROM_ALL) |
Wyatt Hepler | a9e249d | 2020-11-18 09:40:49 -0800 | [diff] [blame] | 37 | add_subdirectory(pw_containers EXCLUDE_FROM_ALL) |
| 38 | add_subdirectory(pw_cpu_exception EXCLUDE_FROM_ALL) |
Armando Montanez | a9ca999 | 2021-01-26 17:06:10 -0800 | [diff] [blame] | 39 | add_subdirectory(pw_cpu_exception_cortex_m EXCLUDE_FROM_ALL) |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 40 | add_subdirectory(pw_hdlc EXCLUDE_FROM_ALL) |
Wyatt Hepler | a9e249d | 2020-11-18 09:40:49 -0800 | [diff] [blame] | 41 | add_subdirectory(pw_kvs EXCLUDE_FROM_ALL) |
| 42 | add_subdirectory(pw_log EXCLUDE_FROM_ALL) |
| 43 | add_subdirectory(pw_log_basic EXCLUDE_FROM_ALL) |
| 44 | add_subdirectory(pw_log_tokenized EXCLUDE_FROM_ALL) |
| 45 | add_subdirectory(pw_minimal_cpp_stdlib EXCLUDE_FROM_ALL) |
| 46 | add_subdirectory(pw_polyfill EXCLUDE_FROM_ALL) |
| 47 | add_subdirectory(pw_protobuf EXCLUDE_FROM_ALL) |
| 48 | add_subdirectory(pw_preprocessor EXCLUDE_FROM_ALL) |
| 49 | add_subdirectory(pw_random EXCLUDE_FROM_ALL) |
| 50 | add_subdirectory(pw_result EXCLUDE_FROM_ALL) |
Alexei Frolov | 5af57d1 | 2021-01-12 11:38:06 -0800 | [diff] [blame] | 51 | add_subdirectory(pw_router EXCLUDE_FROM_ALL) |
Wyatt Hepler | a9e249d | 2020-11-18 09:40:49 -0800 | [diff] [blame] | 52 | add_subdirectory(pw_rpc EXCLUDE_FROM_ALL) |
| 53 | add_subdirectory(pw_span EXCLUDE_FROM_ALL) |
| 54 | add_subdirectory(pw_status EXCLUDE_FROM_ALL) |
| 55 | add_subdirectory(pw_stream EXCLUDE_FROM_ALL) |
| 56 | add_subdirectory(pw_string EXCLUDE_FROM_ALL) |
Alexei Frolov | e39af8d | 2020-12-30 14:55:09 -0800 | [diff] [blame] | 57 | add_subdirectory(pw_sync EXCLUDE_FROM_ALL) |
| 58 | add_subdirectory(pw_sync_stl EXCLUDE_FROM_ALL) |
Wyatt Hepler | a9e249d | 2020-11-18 09:40:49 -0800 | [diff] [blame] | 59 | add_subdirectory(pw_sys_io EXCLUDE_FROM_ALL) |
| 60 | add_subdirectory(pw_sys_io_stdio EXCLUDE_FROM_ALL) |
| 61 | add_subdirectory(pw_tokenizer EXCLUDE_FROM_ALL) |
| 62 | add_subdirectory(pw_trace EXCLUDE_FROM_ALL) |
| 63 | add_subdirectory(pw_unit_test EXCLUDE_FROM_ALL) |
| 64 | add_subdirectory(pw_varint EXCLUDE_FROM_ALL) |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 65 | |
Alexei Frolov | eb94e96 | 2020-12-29 16:15:40 -0800 | [diff] [blame] | 66 | add_subdirectory(targets/host EXCLUDE_FROM_ALL) |
| 67 | |
Wyatt Hepler | a9e249d | 2020-11-18 09:40:49 -0800 | [diff] [blame] | 68 | add_subdirectory(third_party/nanopb EXCLUDE_FROM_ALL) |
| 69 | |
| 70 | add_custom_target(pw_apps) |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 71 | add_dependencies(pw_apps pw_hdlc.rpc_example) |