aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-12-14 16:40:57 +0100
committerThomas White <taw@physics.org>2020-12-14 16:40:57 +0100
commitb4f243ec2c704e510655de8ea34c9fc16f454390 (patch)
treeeed1489dc90a3e12f97d3a9b0c5a8d26b9639e0a /meson.build
parent4f55621cac8ba66236fe602d625ac0a71b842150 (diff)
Meson: Try finding SLURM libraries via pkg-config first
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index af6c5735..0b16d169 100644
--- a/meson.build
+++ b/meson.build
@@ -18,7 +18,13 @@ mdep = cc.find_library('m', required : true)
gsldep = dependency('gsl', required : true)
zlibdep = dependency('zlib', required : true)
pthreaddep = dependency('threads', required : true)
-slurmdep = cc.find_library('slurm', required : false)
+
+# Try via pkg-config first:
+slurmdep = dependency('slurm', required : false)
+if not slurmdep.found()
+ slurmdep = cc.find_library('slurm', required : false)
+endif
+
if slurmdep.found()
conf_data.set10('HAVE_SLURM', 1)
endif