@@ -25,18 +25,19 @@ if is_windows
25
25
sleef_dep = declare_dependency (include_directories : include_directories (sleef_include_dir),
26
26
dependencies : [sleef_lib, sleefquad_lib])
27
27
else
28
- sleef_path = get_option ( ' sleef_path ' )
29
- if sleef_path == ''
30
- sleef_path = run_command ( ' bash ' , ' -c ' , ' echo $SLEEF_PATH ' , check : false ).stdout().strip()
31
- endif
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
32
if sleef_path == ''
33
33
sleef_path = run_command (' bash' , ' -c' , ' echo $CONDA_PREFIX' , check : false ).stdout().strip()
34
34
endif
35
+
35
36
if sleef_path == ''
36
- error (' SLEEF_PATH or CONDA_PREFIX environment variable is not set, and sleef_path option is not provided ' )
37
+ error (' SLEEF_PATH or CONDA_PREFIX environment variable is not set' )
37
38
endif
38
39
39
- message ( ' Using SLEEF path: ' + sleef_path )
40
+ add_project_link_arguments ( ' -L ' + sleef_path + ' /lib ' , language : [ ' c ' , ' cpp ' ] )
40
41
41
42
sleef_include_dir = sleef_path + ' /include'
42
43
sleef_library_dir = sleef_path + ' /lib'
49
50
endif
50
51
51
52
if not sleef_dep.found() or (not is_windows and not sleefquad_dep.found())
52
- error (' SLEEF library not found. Please ensure it is installed in your conda environment or specify the correct path .' )
53
+ error (' SLEEF library not found. Please ensure it is installed in your conda environment.' )
53
54
endif
54
55
55
-
56
56
# Try to get NumPy include path from environment variable first
57
57
if incdir_numpy == ''
58
58
incdir_numpy = run_command (py,
0 commit comments