@@ -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,19 @@ if is_windows
3926 dependencies : [sleef_lib, sleefquad_lib])
4027else
4128 # 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+
4242 sleef_include_dir = sleef_path + ' /include'
4343 sleef_library_dir = sleef_path + ' /lib'
4444
0 commit comments