Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-4194] Lookup pkg-config files in system packages #5074

Closed
swift-ci opened this issue Mar 8, 2017 · 1 comment
Closed

[SR-4194] Lookup pkg-config files in system packages #5074

swift-ci opened this issue Mar 8, 2017 · 1 comment

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Mar 8, 2017

Previous ID SR-4194
Radar None
Original Reporter helge (JIRA User)
Type New Feature
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels New Feature
Assignee None
Priority Medium

md5: 2a965ad3fcce84c6cf499bfe4c6e59ec

duplicates:

Issue Description:

This is a follow up to SR-145 which concludes that include directories can be added via the pkgConfig setting. This is reasonable and works nicely if the library being exposed has such :-)

But when the library has no `.pc` file or the provided `.pc` file can't be processed by SPM (see SR-2481), it is desirable to include a custom `.pc` file in the SwiftPM system module itself.

Example:

import PackageDescription
let package = Package(
  name: "CApache",
  pkgConfig: "CApacheXcode",
)

Then I'd include CApacheXcode.pc in the package, e.g.:

prefix=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr
libdir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
includedir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
    
Name: CApache
Description: Apache compile flags for mod_swift
Version: 2.0.0
Libs: -L${libdir}  -lapr-1 -laprutil-1
Cflags: -I${includedir} -I${includedir}/apr-1 -I${includedir}/apache2

Summary: SPM should add the location of the cloned system module to the lookup list (PKG_CONFIG_PATH) for `pkgConfig` names, so that they can carry their own `.pc` files.

@ankitspd
Copy link
Member

ankitspd commented Mar 8, 2017

This will be handled by the upcoming build settings proposal

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants