[cmake-developers] [CMake 0012370]: Space in MACOSX_BUNDLE target name yields PostBuild script error with Xcode generator

Mantis Bug Tracker mantis at public.kitware.com
Fri Jul 29 01:20:36 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=12370 
====================================================================== 
Reported By:                simleb
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12370
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2011-07-29 01:20 EDT
Last Modified:              2011-07-29 01:20 EDT
====================================================================== 
Summary:                    Space in MACOSX_BUNDLE target name yields PostBuild
script error with Xcode generator
Description: 
When using a space in the target name of a MACOSX_BUNDLE (for an OS X app, it's
pretty common, e.g. "App Store" or "Photo Booth"…) and generating a Xcode
project, then in Xcode the build fails because the post build script tries to
make the target PostBuild.Name\ with\ spaces.$CONFIGURATION of the
XCODE_DEPEND_HELPER.make makefile and I guess make doesn't like it.
See the 'additional informations' for the actual output.

Setting MACOSX_BUNDLE_BUNDLE_NAME to "My App" doesn't help. A solution could be
to produce an app named based on MACOSX_BUNDLE_BUNDLE_NAME instead of the target
name, so you can use a target name like "MyApp" and still get a proper "My
App.app" executable.


This issue is new to CMake 2.8.5 to the best of my knowledge.

Tested on both Xcode 3.2.5 on OS X 10.6 and Xcode 4.1 on OS X 10.7

Using the makefiles generator, there is no issue. I get "My App.app".
For Xcode, the temporary workaround is to skip the space in the target name
(like "MyApp").


Steps to Reproduce: 
1. add_executable("My App" MACOSX_BUNDLE …)

2. $ cmake . -G Xcode

3. Try to build in Xcode

Additional Information: 
echo "Depend check for xcode"
Depend check for xcode
cd /path/to/buildir && make -C /path/to/buildir -f
/path/to/buildir/CMakeScripts/XCODE_DEPEND_HELPER.make PostBuild.My\ App.Debug
make[1]: *** No rule to make target `PostBuild.My App.Debug'.  Stop.
make: *** [Demo] Error 2
Command /bin/sh failed with exit code 2
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-07-29 01:20 simleb         New Issue                                    
======================================================================




More information about the cmake-developers mailing list