Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

error while using tokens in *buildcommands #31

Open
noresources opened this issue Jul 31, 2016 · 2 comments
Open

error while using tokens in *buildcommands #31

noresources opened this issue Jul 31, 2016 · 2 comments

Comments

@noresources
Copy link

Example

project ("MyProject")
    postbuildcommands { "{COPY} 'sourcefile'' '%{cfg.targetdir}'" }

Output an error saying that cfg is not declared

However

project ("MyProject")
    configuration "Anything"
        postbuildcommands { "{COPY} 'sourcefile'' '%{cfg.targetdir}'" }

works, because there is a special case for per-configuration commands in xcode.PBXShellScriptBuildPhase(tr)

IMO, *buildcommands should always be treated as per-configuration items since they can contains per-configuration tokens.
I do not have enough knowledge on how configs are constructed to submit a pull request for this.

@starkos
Copy link
Member

starkos commented Jul 31, 2016

If true, this is actually a bug in the Xcode exporter…it should be pulling from a specific configuration and not the project object.

@fzwoch
Copy link
Contributor

fzwoch commented Aug 29, 2016

I can confirm the issue. Setting the configuration works around it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants