From ca8b6b9ba562013b18257404941c7c5ebf0dc5a3 Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Wed, 27 Nov 2024 20:00:21 +0100 Subject: [PATCH] meson: Favor openldap when building on macOS --- .github/workflows/build.yml | 2 +- meson.build | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c11bd11345d..5eb4d8d01f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -424,7 +424,7 @@ jobs: - uses: actions/checkout@v4 - name: Install dependencies run: | - brew install berkeley-db cmark-gfm dbus docbook-xsl libxslt meson mysql talloc + brew install berkeley-db cmark-gfm dbus docbook-xsl libxslt meson mysql openldap talloc - name: Configure run: | meson setup build \ diff --git a/meson.build b/meson.build index caa66701150..cdeebaa67e9 100644 --- a/meson.build +++ b/meson.build @@ -1361,6 +1361,10 @@ ldap_path = get_option('with-ldap-path') ldap_link_args = [] +if ldap_path == '' and host_os == 'darwin' and fs.exists(macos_prefix / 'opt/openldap') + ldap_path = macos_prefix / 'opt/openldap' +endif + if ldap_path != '' ldap_link_args += ['-L' + ldap_path / 'lib', '-lldap'] ldap = declare_dependency(