@@ -5,21 +5,8 @@ py = py_mod.find_installation()
5
5
6
6
c = meson .get_compiler(' c' )
7
7
8
- # Get the SLEEF path
9
- sleef_path = run_command (' bash' , ' -c' , ' echo $SLEEF_PATH' , check : false ).stdout().strip()
10
- if sleef_path == ''
11
- sleef_path = run_command (' bash' , ' -c' , ' echo $CONDA_PREFIX' , check : false ).stdout().strip()
12
- endif
13
-
14
- if sleef_path == ''
15
- error (' SLEEF_PATH or CONDA_PREFIX environment variable is not set' )
16
- endif
17
-
18
8
is_windows = build_machine .system() == ' windows'
19
9
20
- # Add SLEEF lib directory to library path
21
- add_project_link_arguments (' -L' + sleef_path + ' /lib' , language : [' c' , ' cpp' ])
22
-
23
10
incdir_numpy = ''
24
11
if is_windows
25
12
add_project_arguments (' -DWIN32' , ' -D_WINDOWS' , language : [' c' , ' cpp' ])
@@ -39,6 +26,19 @@ if is_windows
39
26
dependencies : [sleef_lib, sleefquad_lib])
40
27
else
41
28
# Linux and macOS configuration
29
+
30
+ # Get the SLEEF path
31
+ sleef_path = run_command (' bash' , ' -c' , ' echo $SLEEF_PATH' , check : false ).stdout().strip()
32
+ if sleef_path == ''
33
+ sleef_path = run_command (' bash' , ' -c' , ' echo $CONDA_PREFIX' , check : false ).stdout().strip()
34
+ endif
35
+
36
+ if sleef_path == ''
37
+ error (' SLEEF_PATH or CONDA_PREFIX environment variable is not set' )
38
+ endif
39
+
40
+ add_project_link_arguments (' -L' + sleef_path + ' /lib' , language : [' c' , ' cpp' ])
41
+
42
42
sleef_include_dir = sleef_path + ' /include'
43
43
sleef_library_dir = sleef_path + ' /lib'
44
44
0 commit comments