build-script: find sqlite header

User-installed package headers are installed to `/usr/local/include` on
FreeBSD. The build system should tell the compiler where the additional
headers are located.
This commit is contained in:
Evan Wilde
2025-05-30 15:32:31 -07:00
parent 12dc0483e3
commit 4fcb707eb3

View File

@@ -137,6 +137,11 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace, suppress_verb
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
]
elif '-freebsd' in build_target:
# pkg installs packages to /usr/local/include on FreeBSD
# Required for SwiftPM to find sqlite
swiftpm_args += ['-Xcxx', '-I', '-Xcxx', '/usr/local/include',
'-Xswiftc', '-I', '-Xswiftc', '/usr/local/include']
elif not build_os.startswith('macosx'):
# Library rpath for swift, dispatch, Foundation, etc. when installing
swiftpm_args += [