@@ -5,21 +5,8 @@ py = py_mod.find_installation()
55
66c = meson .get_compiler(' c' )
77
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-
188is_windows = build_machine .system() == ' windows'
199
20- # Add SLEEF lib directory to library path
21- add_project_link_arguments (' -L' + sleef_path + ' /lib' , language : [' c' , ' cpp' ])
22-
2310incdir_numpy = ''
2411if is_windows
2512 add_project_arguments (' -DWIN32' , ' -D_WINDOWS' , language : [' c' , ' cpp' ])
@@ -39,6 +26,16 @@ if is_windows
3926 dependencies : [sleef_lib, sleefquad_lib])
4027else
4128 # Linux and macOS configuration
29+ sleef_path = run_command (' bash' , ' -c' , ' echo $SLEEF_PATH' , check : false ).stdout().strip()
30+ if sleef_path == ''
31+ sleef_path = run_command (' bash' , ' -c' , ' echo $CONDA_PREFIX' , check : false ).stdout().strip()
32+ endif
33+ if sleef_path == ''
34+ error (' SLEEF_PATH or CONDA_PREFIX environment variable is not set' )
35+ endif
36+
37+ add_project_link_arguments (' -L' + sleef_path + ' /lib' , language : [' c' , ' cpp' ])
38+
4239 sleef_include_dir = sleef_path + ' /include'
4340 sleef_library_dir = sleef_path + ' /lib'
4441
0 commit comments