Skip to content

Commit 4fcb707

Browse files
committed
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.
1 parent 12dc048 commit 4fcb707

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Utilities/build-script-helper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace, suppress_verb
137137
swiftpm_args += [
138138
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
139139
]
140+
elif '-freebsd' in build_target:
141+
# pkg installs packages to /usr/local/include on FreeBSD
142+
# Required for SwiftPM to find sqlite
143+
swiftpm_args += ['-Xcxx', '-I', '-Xcxx', '/usr/local/include',
144+
'-Xswiftc', '-I', '-Xswiftc', '/usr/local/include']
140145
elif not build_os.startswith('macosx'):
141146
# Library rpath for swift, dispatch, Foundation, etc. when installing
142147
swiftpm_args += [

0 commit comments

Comments
 (0)