<!--
{
  "availability" : [
    "SwiftPM: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PackageDescription",
  "identifier" : "/documentation/PackageDescription/CSetting/headerSearchPath(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "PackageDescription"
    ],
    "preciseIdentifier" : "s:18PackageDescription8CSettingV16headerSearchPathyACSS_AA21BuildSettingConditionVSgtFZ"
  },
  "title" : "headerSearchPath(_:_:)"
}
-->

# headerSearchPath(_:_:)

Provides a header search path relative to the target’s directory.

```
static func headerSearchPath(_ path: String, _ condition: BuildSettingCondition? = nil) -> CSetting
```

## Parameters

`path`

The path of the directory that contains the headers. The path is relative to the target’s directory.

`condition`

A condition that restricts the use of the build setting.

## Discussion

Use this setting to add a search path for headers within your target.
You can’t use absolute paths and you can’t use this setting to provide
headers that are visible to other targets.

The path must be a directory inside the package.

> Since: First available in PackageDescription 5.0.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)