<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">And here’s the command I’ve been using to generate the Xcode project for anyone else interested:</div><div class=""><br class=""></div><div class=""><span style="font-family: Menlo; background-color: rgba(255, 255, 255, 0.85098);" class="">$ swift package generate-xcodeproj --verbose --xcconfig-overrides ./Configuration.xcconfig --output ./SPMTester.xcodeproj</span></div><div class=""><br class=""></div><div class="">And the xcconfig:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">SDKROOT = macosx</span></div><div style="margin: 0px; line-height: normal; font-family: Monaco;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MACOSX_DEPLOYMENT_TARGET = </span><span style="font-variant-ligatures: no-common-ligatures; color: #2d8dff" class="">10.11</span></div></div><br class=""><div class="">Cheers,</div><div class="">
<div id="signature" class=""><div class="">--</div><div class=""><br class=""></div><div class="">Christian</div></div></div><div class=""><br class="webkit-block-placeholder"></div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="">Thanks for all the help so far everyone. I’ve now been able to successfully compile an example command line tool with Alamofire using `--xcconfig-overrides` flag and an .xcconfig file. However, I’ve run into one issue and have an additional question.<br class=""><br class="">The issue I’m hitting is that the project still has the `MACOSX_DEPLOYMENT_TARGET` manually set (it’s bold) to `10.10` even though the xcconfig is loaded and has overridden it. If I delete the manual setting, the deployment target is set to 10.11 which is coming from the xcconfig file. While this is certainly nice, it may throw some people off at first when using this approach.<br class=""><br class="">The second question I have is whether this type of override is planned for `swift build` or just for creating an Xcode project? My apologies if this has been answered in other threads, but I haven’t been able to track this down yet.<br class=""><br class="">Thanks!<br class="">--<br class=""><br class="">Christian<br class=""><br class=""><blockquote type="cite" class="">On Sep 30, 2016, at 11:08 AM, Keith Smiley <<a href="mailto:k@keith.so" class="">k@keith.so</a>> wrote:<br class=""><br class="">Here's the PR that allows you to override this from the command line:<br class=""><a href="https://github.com/apple/swift-package-manager/pull/715" class="">https://github.com/apple/swift-package-manager/pull/715</a><br class=""><br class="">--<br class="">Keith Smiley<br class=""><br class="">On 09/26, Daniel Dunbar via swift-users wrote:<br class=""><blockquote type="cite" class="">There isn't yet a builtin way to manage this. When generating an Xcode project, you can use the undocumented `--xcconfig-overrides` option to pass a path to an extra .xcconfig file you wish to include in the project and have build settings read from. You could then override the deployment target there.<br class=""><br class="">See also:<br class=""> https://lists.swift.org/pipermail/swift-build-dev/Week-of-Mon-20160919/000636.html<br class=""><br class="">- Daniel<br class=""><br class=""><blockquote type="cite" class="">On Sep 24, 2016, at 4:44 PM, Gmail via swift-users <swift-users@swift.org> wrote:<br class=""><br class="">Does anyone know if it’s possible to set the deployment target when building with the Swift Package Manager (SPM)? From what I can tell, it is not currently possible to override it based on the source code itself. In the pbxproj().swift <https://github.com/apple/swift-package-manager/blob/master/Sources/Xcodeproj/pbxproj().swift#L73-L78> file, the MACOSX_DEPLOYMENT_TARGET is hardcoded to 10.10 with a FIXME saying it needs to be configurable.<br class=""><br class="">If this currently cannot be overridden, then I’d like to file a feature request so we can build Alamofire 4.0.0 with the SPM. If it can be overridden, I’d really appreciate someone letting me know how.<br class=""><br class="">Thanks in advance!<br class=""><br class="">_______________________________________________<br class="">swift-users mailing list<br class="">swift-users@swift.org<br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class=""></blockquote><br class=""><blockquote type="cite" class="">_______________________________________________<br class="">swift-users mailing list<br class="">swift-users@swift.org<br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></body></html>