You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/template_dir: -[no]cmake flag for CMake module installation
There are two issues with CMake module installation that are
problematic for distro packages:
1. the cmake module is installed under $HOME and this path is not overridable
2. the path to SDK recorded in the cmake file is the same as the
target directory, which might be prefixed by the staging path of the
package build (e.g. ~/mypackages/zerphyr-sdk/destdir/opt/zerphyr-sdk),
not the final installation directory in the system (/opt/zephyr-sdk).
1 is fixable by making the variable overridable from the environment:
: ${ZEPHYR_SDK_REGISTRY_DIR:=$HOME/.cmake/packages/Zephyr-sdk}
(but this may be a bashism). But, 1 is not useful unless 2 is also
addressed.
2 might be fixable by introducing a prefix argument -p (default "") in
addition to the target_dir (-d), and composing the destination directory
for copying files as $prefix/$target_dir while using only $target_dir
wherever installation paths are written, such as in the CMake module.
Until 1 or 2 are addressed, add -[no]cmake arg so that the package
scripts can install the CMake module themselves.
0 commit comments