MantisBT - CMake
View Issue Details
0015183CMakeCMakepublic2014-10-01 09:092016-06-10 14:31
Jan Rüegg 
Gregor Jasny 
normalminoralways
closedmoved 
OSX / XCode4 to XCode 6
CMake 3.0.1 
 
0015183: Xcode INSTALL_PATH setting makes archiving impossible
CMake sets CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH to an empty string ("") when generating xcode projects. For whatever reason archiving projects only works when
- INSTALL_PATH is NOT set
- INSTALL_PATH is set to some value other than the empty string ("")

It does NOT work when
- INSTALL_PATH is set to the empty string

So I propose for CMake to not set this value at all, then XCode takes some default which works for archiving files.

See also here:
http://web.archiveorange.com/archive/v/5y7PklO3CkRUMmyHhIlr [^]

and here:
http://public.kitware.com/pipermail/cmake/2011-June/045159.html [^]

and here:
http://stackoverflow.com/a/8102602/369009 [^]
- Create XCode project with CMake (for example for ios).
- Try to archive it "Product->Archive"
- Nothing happens
No tags attached.
related to 0015441closed Gregor Jasny Xcode generator does not generate scheme 
related to 0015946closed Kitware Robot "xcodebuild -target foo install" should do something sensible 
Issue History
2014-10-01 09:09Jan RüeggNew Issue
2014-10-01 09:18Jan RüeggNote Added: 0036882
2014-10-02 08:35Brad KingNote Added: 0036886
2014-10-02 08:36Brad KingSummaryCMAKE_XCODE_ATTRIBUTE_INSTALL_PATH setting makes archiving impossible => Xcode INSTALL_PATH setting makes archiving impossible
2016-01-13 08:46Brad KingNote Added: 0040214
2016-01-13 09:58Gregor JasnyAssigned To => Gregor Jasny
2016-01-13 09:58Gregor JasnyStatusnew => assigned
2016-01-30 17:40Gregor JasnyRelationship addedrelated to 0015946
2016-01-30 17:41Gregor JasnyRelationship addedrelated to 0015441
2016-01-30 17:46Gregor JasnyNote Added: 0040381
2016-06-10 14:29Kitware RobotNote Added: 0042641
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0036882)
Jan Rüegg   
2014-10-01 09:18   
Actually, not setting it makes XCode take the default value "/Applications". So setting it to this by default might be an alternative...
(0036886)
Brad King   
2014-10-02 08:35   
IIRC this value is controlled by the INSTALL_NAME_DIR target property:

 http://www.cmake.org/cmake/help/v3.0/prop_tgt/INSTALL_NAME_DIR.html [^]
(0040214)
Brad King   
2016-01-13 08:46   
Proposed patch on mailing list:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/15425 [^]
(0040381)
Gregor Jasny   
2016-01-30 17:46   
After reading 0015946 I'm not sure the patch is correct. If we write a project with empty INSTALL_PATH archiving will work, but also xcodebuild install will install something. It will install the targets into /usr/local/something.

IMHO instead the correct fix would be to add schema support (0015441) and add a "cmake install" call prior to archiving so that the built products are archived like they would be installed by cmake.
(0042641)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.