From df502884135f4e766d4285fa9325f9aae3a5aa57 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Sat, 18 Nov 2023 12:31:13 +0000 Subject: [PATCH] find libs with dependency rather than find_library find_library only does a basic search for libs where dependency can use cmake and pkg-config. this is helpful on systems like nix where libraries are located over may uniquely named directories --- meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 10b7cfd..b9c2673 100644 --- a/meson.build +++ b/meson.build @@ -7,17 +7,17 @@ blas_deps = [] if host_machine.system() == 'darwin' blas_deps = [dependency('Accelerate')] else - blas_deps = [cc.find_library('openblas', static: get_option('link_blas_statically'), required : false)] + blas_deps = [dependency('openblas', static: get_option('link_blas_statically'), required : false)] endif # try to find blas/cblas (e.g., Linux) if not blas_deps[0].found() - blas_deps = [cc.find_library('blas', static: get_option('link_blas_statically'), required : false)] - lapack_dep = cc.find_library('lapack', static: get_option('link_blas_statically'), required : false) + blas_deps = [dependency('blas', static: get_option('link_blas_statically'), required : false)] + lapack_dep = dependency('lapack', static: get_option('link_blas_statically'), required : false) if lapack_dep.found() blas_deps += lapack_dep endif - cblas_dep = cc.find_library('cblas', static: get_option('link_blas_statically'), required : false) + cblas_dep = dependency('cblas', static: get_option('link_blas_statically'), required : false) if cblas_dep.found() blas_deps += cblas_dep endif