Skip to content

Commit 629f606

Browse files
committed
meson: check for cliquer, planarity and brial via pkg-config
1 parent 486d70d commit 629f606

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

src/sage/graphs/meson.build

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@ if cc.has_header('mcqd.h')
55
else
66
mcqd = disabler()
77
endif
8-
cliquer = cc.find_library('cliquer', required: not is_windows, disabler: true)
98

10-
# Cannot be found via pkg-config
11-
planarity = cc.find_library(
12-
'planarity',
13-
required: not is_windows,
14-
disabler: true,
15-
)
9+
cliquer = dependency('libcliquer', required: false, disabler: true)
10+
if not cliquer.found()
11+
# fallback for older versions without pkg-config
12+
cliquer = cc.find_library('cliquer', required: not is_windows, disabler: true)
13+
endif
14+
15+
planarity = dependency('libplanarity', required: false, disabler: true)
16+
if not planarity.found()
17+
# fallback for older versions without pkg-config
18+
planarity = cc.find_library(
19+
'planarity',
20+
required: not is_windows,
21+
disabler: true,
22+
)
23+
endif
1624

1725
py.install_sources(
1826
'__init__.py',

src/sage/rings/polynomial/pbori/meson.build

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
brial = cc.find_library('brial', required: false, disabler: true)
1+
brial = dependency('brial', required: false, disabler: true)
2+
if not brial.found()
3+
# fallback for older versions without pkg-config
4+
brial = cc.find_library('brial', required: false, disabler: true)
5+
endif
26
# Cannot be found via pkg-config
37
brial_groebner = cc.find_library(
48
'brial_groebner',

0 commit comments

Comments
 (0)