Skip to content

[SR-1169] SwiftPM does not support Xcode project generation for system packages #5463

@swift-ci

Description

@swift-ci
Previous ID SR-1169
Radar None
Original Reporter paulofaria (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee @aciidb0mb3r
Priority Medium

md5: 43eab0fe11fa0e3134b2edf88b3d51e7

Issue Description:

The command swift build -X doesn't work for system packages.

For example:

git clone https://github.com/Zewo/OpenSSL
cd OpenSSL
swift build -X

Now open OpenSSL.xcodeproj. Build will fail.
To make it work we need to add some configurations manually:

/usr/local/include in Build Settings > Search Paths > Header Search Paths
/usr/local/lib in Build Settings > Search Paths > Library Search Paths

I think the solution would be to support:

swift build -X -Xcc -I/usr/local/include -Xlinker -L/usr/local/lib

Which would add the correct paths to Xcode configuration automatically.
This also makes sense cause this is the command needed to actually build the module.

swift build -Xcc -I/usr/local/include -Xlinker -L/usr/local/lib

CC: @ddunbar

Edit: I think #235 is needed to reproduce.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions