Search code examples
iosbashqtqt-creatorqmake

Use name with whitespace for qmake TARGET variable


iOS/OS X application names usually contains spaces (like "App Store.app"). But when i'm trying to use such name in my Qt/ios project like this:

ios: TARGET = "My Cool App"

build process failed with strange error in the autogenerated by Qt Bash script.

Am i doing something wrong, or such whitespaces in names just don't supported?

UPD the problem first time occurs in qmake-generated shell script:

#!/bin/sh
cp -r $BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME /Users/eraxillan/Projects/<PROJECT_DIR>

If $FULL_PRODUCT_NAME contains spaces, then script just fails.

Script generated and executed only in case of custom DESTDIR project variable value - my case.
So, looks like a bug in qmake-generated script to copy project build artefacts to custom output directory.

Workarounds:

  • Remove spaces from target name (My Cool App --> my-cool-app)
  • Do not use custom DESTDIR value at all

Hope this will be helpful


Solution

  • This should work:

    TARGET = My" "Cool" "App