zephyr/share/sysbuild/CMakeLists.txt
Torsten Rasmussen be2993be6e sysbuild: move sysbuild/application to _sysbuild
The sysbuild part of sysbuild/application creates a sysbuild/application
folder under top-level build dir. However, having a sysbuild folder at
this level means that tab completion for sysbuild pre-fixed build
targets will stop after completing just `sysbuild` and then show several
subfolders, making it hard to see important build targets, such as:
`ninja sysbuild_menuconfig`.

As `sysbuild/application` is just a folder name, then move it to
`_sysbuild` instead to avoid impacting tab completion for  ninja and
make.

Also strip the `application` part in the process, as the extra folder
doesn't provide any extra benefit, but is just one more level to enter
when browsing the build folder structure.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-17 12:10:43 -04:00

28 lines
877 B
CMake

# Copyright (c) 2021-2023 Nordic Semiconductor
#
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20)
if(NOT DEFINED APP_DIR)
message(FATAL_ERROR "No main application specified")
endif()
# This will update the APP_DIR cache variable to PATH type and apply a comment.
# If APP_DIR is a relative path, then CMake will adjust to absolute path based
# on current working dir.
set(APP_DIR ${APP_DIR} CACHE PATH "Main Application Source Directory")
set(Sysbuild_DIR ${CMAKE_CURRENT_LIST_DIR}/../sysbuild-package/cmake)
project(sysbuild_toplevel LANGUAGES)
if(NOT DEFINED APPLICATION_BINARY_DIR)
set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application Binary Directory")
endif()
if(EXISTS ${APP_DIR}/sysbuild/CMakeLists.txt)
add_subdirectory(${APP_DIR}/sysbuild _sysbuild)
else()
add_subdirectory(template _sysbuild)
endif()