Skip to content

Commit 797fd82

Browse files
committed
workflow: fixing macos deployment target and dynamic libs on linux
1 parent bda104d commit 797fd82

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797
CIBW_ENABLE: cpython-prerelease cpython-freethreading
9898
CIBW_ARCHS_MACOS: ${{ matrix.os == 'macos-13' && 'x86_64' || 'arm64' }}
9999
CIBW_BUILD_VERBOSITY: "3"
100+
CIBW_ENVIRONMENT: >
101+
MACOSX_DEPLOYMENT_TARGET="${{ matrix.os == 'macos-13' && '13.0' || '14.0' }}"
100102
CIBW_REPAIR_WHEEL_COMMAND: >
101103
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
102104
CIBW_TEST_COMMAND: |

quaddtype/subprojects/packagefiles/sleef/meson.build

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@ project('sleef', version: '3.8')
33
cmake = find_program('cmake')
44
ninja = find_program('ninja', 'make', required: false)
55

6-
76
sleef_build_dir = 'sleef_build'
87
sleef_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

1115
sleef_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())
2630
endif
2731

28-
2932
sleef_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

3740
sleef_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

4043
sleef_build_dep = declare_dependency(sources: [sleef_build_target])
41-
4244
sleef_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-
4849
sleefquad_dep = declare_dependency(
4950
dependencies: [sleef_build_dep],
5051
compile_args: ['-I' + sleef_include_path],

0 commit comments

Comments
 (0)