aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2023-04-17 18:55:49 +0000
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-17 18:55:49 +0000
commita18516991976c33a7927fea20b2fbb100849463a (patch)
tree3132f9b976d3f97eca491c3992b630738ee40b1e /CMakeLists.txt
parente5093db8c8909f19ff435eb5bd685fb436be92c2 (diff)
downloadpigweed-a18516991976c33a7927fea20b2fbb100849463a.tar.gz
zephyr: Fix incorrect include order for CMake
Including the zephyr/ directory at the top was incorrect since it references Pigweed modules that haven't been declared yet. Change-Id: Ia2f3dad69da52194f6aa1acb87678f7aceda0dc1 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/139150 Reviewed-by: Keir Mierle <keir@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6723adee9..d5fcd3228 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,8 +47,6 @@ if(CONFIG_ZEPHYR_PIGWEED_MODULE)
if(CONFIG_NANOPB AND "${dir_pw_third_party_nanopb}" STREQUAL "")
set(dir_pw_third_party_nanopb "${ZEPHYR_NANOPB_MODULE_DIR}" CACHE PATH "" FORCE)
endif()
-
- add_subdirectory(zephyr)
endif()
add_subdirectory(pw_allocator EXCLUDE_FROM_ALL)
@@ -133,7 +131,9 @@ add_subdirectory(third_party/freertos EXCLUDE_FROM_ALL)
add_subdirectory(third_party/fuchsia EXCLUDE_FROM_ALL)
add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
-if(NOT ZEPHYR_PIGWEED_MODULE_DIR)
+if(CONFIG_ZEPHYR_PIGWEED_MODULE)
+ add_subdirectory(zephyr)
+else()
add_subdirectory(targets/host EXCLUDE_FROM_ALL)
add_custom_target(pw_apps)