@@ -3,18 +3,22 @@ project('sleef', version: '3.8')
33cmake = find_program (' cmake' )
44ninja = find_program (' ninja' , ' make' , required : false )
55
6-
76sleef_build_dir = ' sleef_build'
87sleef_install_dir = ' sleef_install'
98
9+ # This can be done manually from user side, but lets handle it here as well
10+ libdir = ' lib'
11+ if host_machine .system() == ' linux' and host_machine .cpu_family() == ' x86_64'
12+ libdir = ' lib64'
13+ endif
1014
1115sleef_configure = run_command ([
1216 cmake,
1317 ' -S' , meson .current_source_dir(),
1418 ' -B' , meson .current_build_dir() / sleef_build_dir,
1519 ' -DCMAKE_BUILD_TYPE=Release' ,
1620 ' -DSLEEF_BUILD_QUAD=ON' ,
17- ' -DBUILD_SHARED_LIBS =OFF' , # building & linnking statically
21+ ' -DSLEEF_BUILD_SHARED_LIBS =OFF' ,
1822 ' -DSLEEF_BUILD_TESTS=OFF' ,
1923 ' -DSLEEF_BUILD_INLINE_HEADERS=OFF' ,
2024 ' -DCMAKE_POSITION_INDEPENDENT_CODE=ON' ,
@@ -25,26 +29,23 @@ if sleef_configure.returncode() != 0
2529 error (' SLEEF CMake configuration failed: ' + sleef_configure.stderr())
2630endif
2731
28-
2932sleef_build_target = custom_target (' sleef_build' ,
3033 command : [cmake, ' --build' , meson .current_build_dir() / sleef_build_dir, ' --target' , ' install' , ' --parallel' ],
31- output : ' sleef_built.stamp' ,
34+ output : ' sleef_built.stamp' , # Dummy stamp file
3235 console : true ,
3336 build_always_stale : true ,
3437 build_by_default : true
3538)
3639
3740sleef_include_path = meson .current_build_dir() / sleef_install_dir / ' include'
38- sleef_lib_path = meson .current_build_dir() / sleef_install_dir / ' lib '
41+ sleef_lib_path = meson .current_build_dir() / sleef_install_dir / libdir
3942
4043sleef_build_dep = declare_dependency (sources : [sleef_build_target])
41-
4244sleef_dep = declare_dependency (
43- dependencies : [sleef_build_dep],
45+ dependencies : [sleef_build_dep],
4446 compile_args : [' -I' + sleef_include_path],
4547 link_args : [' -L' + sleef_lib_path, ' -lsleef' ]
4648)
47-
4849sleefquad_dep = declare_dependency (
4950 dependencies : [sleef_build_dep],
5051 compile_args : [' -I' + sleef_include_path],
0 commit comments