Consider the following SPM manifest:
targets: [
.executableTarget(
name: "MyExec"
),
.plugin(
name: "MyPlugin",
dependencies: [
target(name: "MyExec")
]
)
.target(
name: "ResultTarget",
dependencies: [],
plugins: [
.plugin(name: "MyPlugin")
]
)
]
MyPlugin retrieves path to MyExec as
let tool = context.tool(named: "MyExec").path
throw TheError.descriptive(tool) /// ${CONFIGURATION_BUILD_DIR}/MyExec
But I got an error at build step
${CONFIGURATION_BUILD_DIR}/MyExec" - no such file or directory.
Should I somehow add this environment variable to prebuildCommand
?
UPD
I can use buildCommand
as alternative and all environment variables will be set at this moment.