Re: [swift-users] SPM & Library with bridging header

2017-01-21 Thread Rien via swift-users
== This works: == First I need openSSL from Swift, that I have done with COpenSsl: Package.swift: import PackageDescription let package = Package( name: "COpenSsl", pkgConfig: "openssl" ) m

Re: [swift-users] SPM & Library with bridging header

2017-01-21 Thread Daniel Dunbar via swift-users
What is the glue code you need? You can define a C/Obj-C target in the same Swift package, and then use it from your Swift targets. See: https://github.com/apple/swift-package-manager/blob/master/Documentation/Reference.md#source-layouts

Re: [swift-users] SPM & Library with bridging header

2017-01-21 Thread Rien via swift-users
The thing I was missing is the “system module”.. found it now though ;-) So far so good, I want to put that little glue code I need in its own module. However I cannot find how to specify the import search path. “swift build -I /usr/local/include/“ does not work (unknown command -I) And pkgConf

Re: [swift-users] SPM & Library with bridging header

2017-01-20 Thread Daniel Dunbar via swift-users
> On Jan 20, 2017, at 9:39 AM, Jordan Rose via swift-users > wrote: > > Hi, Rien. Libraries don’t support bridging headers because the client of the > library has to be able to import the header, and arbitrary bridging headers > may conflict. (This is actually the primary purpose of modules f

Re: [swift-users] SPM & Library with bridging header

2017-01-20 Thread Rien via swift-users
I may be missing something here, so please bear with me... The client of the lib only has to see the headers that describe the lib, not the headers of the files that were used to create the lib. Or are you referring to a case were the lib also exposes the headers of the libs that were used to cr

Re: [swift-users] SPM & Library with bridging header

2017-01-20 Thread Jordan Rose via swift-users
Hi, Rien. Libraries don’t support bridging headers because the client of the library has to be able to import the header, and arbitrary bridging headers may conflict. (This is actually the primary purpose of modules for Objective-C: to declare a group of headers that are self-contained—besides w

[swift-users] SPM & Library with bridging header

2017-01-20 Thread Rien via swift-users
I noticed something strange about Xcode and SPM concerning the capability to generate Libraries. When I try to create a Library in Xcode and then want to add an Objective-C bridging header, that is denied. It claims that bridging is not supported for Libraries. When I create an Xcode project t