From 4fcb707eb355fbcf24366dceb0c466ecfdc5364b Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Fri, 30 May 2025 15:32:31 -0700 Subject: [PATCH] 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. --- Utilities/build-script-helper.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Utilities/build-script-helper.py b/Utilities/build-script-helper.py index d264f10c..846d71c2 100755 --- a/Utilities/build-script-helper.py +++ b/Utilities/build-script-helper.py @@ -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 += [