Skip to content
  • Brad King's avatar
    Xcode: Fix OBJECT library support for Xcode 5 (#14254) · a3194ff4
    Brad King authored
    Xcode 2.1 through 4 supported $(CURRENT_ARCH) in a PBXFileReference
    'path' value used in the "Link Binary with Libraries" build phase.
    CMake uses this to reference object file locations on link lines to
    bring in OBJECT library content.  However, Xcode 5 now evaluates the
    $(CURRENT_ARCH) reference in this context as "undefined_arch" so the
    wrong path is given to the linker.  There seems to be no alternative way
    to produce an architecture-specific value in a PBXFileReference.
    
    Fortunately Xcode 5 now also handles link dependencies for paths linked
    through OTHER_LDFLAGS.  For Xcode >= 5, move the OBJECT library object
    file references from the link build phase to OTHER_LDFLAGS.  We can
    still show the object files in the source group listing in either case.
    a3194ff4