fix(apps): make app CMakeLists out-of-tree build safe#619
Merged
Conversation
add_subdirectory() with an absolute ${APP_PATH}/... source dir needs an
explicit binary directory when the app is built out-of-tree (copied into a
project's source/embedded and include()'d by the SDK from outside the SDK
source tree). Otherwise CMake errors: "add_subdirectory not given a binary
directory ... is not a subdirectory of ...".
Give each such call a unique ${CMAKE_BINARY_DIR}/app_<name> binary dir:
- apps/tuya.ai/your_chat_bot (display2, battery)
- apps/tuya.ai/your_robot_dog (display)
- apps/tuya.ai/your_serial_chat_bot (battery)
- apps/tuya_t5_pocket/tuya_t5_pocket_ai (display x2 exclusive branches, expand)
- examples/tflite/tflite-helloworld (tflite)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
shiliu-yang
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add_subdirectory() with an absolute ${APP_PATH}/... source dir needs an explicit binary directory when the app is built out-of-tree (copied into a project's source/embedded and include()'d by the SDK from outside the SDK source tree). Otherwise CMake errors: "add_subdirectory not given a binary directory ... is not a subdirectory of ...".
Give each such call a unique ${CMAKE_BINARY_DIR}/app_ binary dir:
PR 描述/PR description
[在此详细描述 PR 的内容]/[Describe the PR content in detail here]
代码质量/Code Quality:
在本次拉取请求中,我已考虑以下事项 As part of this pull request, I've considered the following: