79598292

Date: 2025-04-29 11:55:19
Score: 0.5
Natty:
Report link

Settled on using the 3. approach, like avahi.bb does.

Addding the FILES lines to the recipe, the main123 file will not be installed when using IMAGE_INSTALL:append = " mwe-so". If some user of the recipe wants the files, they have to do additionally install the package named mwe-optional-files

SUMMARY = "mwe stackoverflow"
LICENSE = "CLOSED"
LICENSE:mwe-optional-files = "CLOSED"

FILESEXTRAPATHS:prepend := "${THISDIR}:"
SRC_URI += "file://CMakeLists.txt"
SRC_URI += "file://main.c"
SRC_URI += "file://main2.c"
S = "${WORKDIR}"

inherit cmake pkgconfig

PACKAGES =+ "mwe-optional-files"
PROVIDES =+ "mwe-optional-files"

FILES:{PN} = "whatever files you want normally installed"
FILES:mwe-optional-files = "/usr/local/bin/main123/mwe"
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Mo_