lolgear
(Dmitry Lobanov)
1
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.
Luke_Lau
(Luke Lau)
2
For what it’s worth, it worked with me by passing a string literal as a dependency instead of manually specifying product or target