From 34dc772537e47d8a46cf058855cf4b2518d5f3cf Mon Sep 17 00:00:00 2001 From: dgsga <181612+dgsga@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:36:34 +0000 Subject: [PATCH] Improve syntax of libgcrypt macro --- meson.build | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 7aab92dfa1..a813cffd80 100644 --- a/meson.build +++ b/meson.build @@ -816,16 +816,15 @@ if libgcrypt_dir != '' link_args: ['-L' + libgcrypt_dir / 'lib', '-lgcrypt'], include_directories: include_directories(libgcrypt_dir / 'include'), ) -endif - -libgcrypt = dependency('libgcrypt', required: false) - -if not libgcrypt.found() - libgcrypt = cc.find_library( - 'libgcrypt', - dirs: libsearch_dirs, - required: false, - ) +else + libgcrypt = dependency('libgcrypt', required: false) + if not libgcrypt.found() + libgcrypt = cc.find_library( + 'libgcrypt', + dirs: libsearch_dirs, + required: false, + ) + endif endif libgcrypt_config = find_program(