From 34950b696e9182d0c9c55c75978832ef2daad5d1 Mon Sep 17 00:00:00 2001 From: Elliot Glaysher Date: Tue, 3 Apr 2018 11:05:41 -0700 Subject: [PATCH] Remove manual PKG_CONFIG_PATH configuration. Thanks @joemfb! --- README.md | 5 ----- meson.build | 9 ++++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a92c634971..228e003366 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,6 @@ Some libraries which are not found in major distributions: are included as git submodules. To build urbit from source, perform the following steps: -## MacOS specifics -On macos, you need to make sure `pkg-config` uses the correct homebrew path. - The `export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig/:$PKG_CONFIG_PATH` - should setup the `pkg-config` path correctly, solving errors with homebrew package discovery (notably with `openssl` paths). - ## Configuration & compilation (For instructions for legacy meson, also see below) diff --git a/meson.build b/meson.build index e0378aabc6..b26e29332a 100644 --- a/meson.build +++ b/meson.build @@ -278,9 +278,16 @@ configure_file(input : 'include/config.h.in', configuration : conf_data) # We expect these libs to supplied with the distribution -openssl_dep = dependency('openssl', version: '>=1.0.0') curl_dep = dependency('libcurl', version: '>=7.35.0') +if osdet == 'darwin' + libcrypto = meson.get_compiler('c').find_library('crypto', dirs: [ '/usr/local/opt/openssl/lib/' ]) + libssl = meson.get_compiler('c').find_library('ssl', dirs: [ '/usr/local/opt/openssl/lib/' ]) + openssl_dep = declare_dependency(dependencies: [libcrypto, libssl], include_directories: include_directories('/usr/local/opt/openssl/include')) +else + openssl_dep = dependency('openssl', version: '>=1.0.0') +endif + if(legacy_meson) gmp_dep = find_library('gmp') sigsegv_dep = find_library('sigsegv')