---
title: "headerSearchPath(_:_:)"
framework: swift-package-manager
role: symbol
role_heading: Type Method
path: "swift-package-manager/documentation/packagedescription/cxxsetting/headersearchpath(_:_:)"
---

# headerSearchPath(_:_:)

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

## Declaration

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

## 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 application of the build setting.

## Discussion

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. note: First available in PackageDescription 5.0.

## See Also

### Configuring CXX Settings

- [define(_:to:_:)](swift-package-manager/documentation/packagedescription/cxxsetting/define(_:to:_:).md)
- [unsafeFlags(_:_:)](swift-package-manager/documentation/packagedescription/cxxsetting/unsafeflags(_:_:).md)
