Skip to content

Commit b1e8a65

Browse files
authored
Merge pull request #169 from OpenBrickProtocolFoundation/additional-wrapper-changes
build system: keep flag "-stdlib=libc++" private in pkg-config files
2 parents 56ca719 + 5a7db3c commit b1e8a65

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
library_type: static
4242
shell: "msys2 {0}"
4343

44-
4544
- name: Linux Release
4645
os: ubuntu
4746
os-version: 24.04

src/libs/core/meson.build

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,18 @@ liboopetris_core = library(
2121
version: meson.project_version(),
2222
install: true,
2323
)
24+
## remove '-stdlib=libc++' from the list, if it's present
25+
core_dep_compile_args = []
26+
foreach value : core_lib.get('compile_args')
27+
if value != '-stdlib=libc++'
28+
core_dep_compile_args += value
29+
endif
30+
endforeach
2431

2532
liboopetris_core_dep = declare_dependency(
2633
link_with: liboopetris_core,
2734
include_directories: core_lib.get('inc_dirs'),
28-
compile_args: core_lib.get('compile_args'),
35+
compile_args: core_dep_compile_args,
2936
dependencies: core_lib.get('deps'),
3037
version: meson.project_version(),
3138
)
@@ -37,14 +44,6 @@ install_headers(
3744
preserve_path: true,
3845
)
3946

40-
## remove '-stdlib=libc++' from the list, if it's present
41-
core_dep_compile_args = []
42-
foreach value : core_lib.get('compile_args')
43-
if value != '-stdlib=libc++'
44-
core_dep_compile_args += value
45-
endif
46-
endforeach
47-
4847
# generate pkgconfig files
4948
pkg = import('pkgconfig')
5049

src/libs/recordings/meson.build

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,19 @@ liboopetris_recordings = library(
2525
install: true,
2626
)
2727

28+
## remove '-stdlib=libc++' from the list, if it's present
29+
recordings_dep_compile_args = []
30+
foreach value : recordings_lib.get('compile_args')
31+
if value != '-stdlib=libc++'
32+
recordings_dep_compile_args += value
33+
endif
34+
endforeach
35+
36+
2837
liboopetris_recordings_dep = declare_dependency(
2938
link_with: liboopetris_recordings,
3039
include_directories: recordings_lib.get('inc_dirs'),
31-
compile_args: recordings_lib.get('compile_args'),
40+
compile_args: recordings_dep_compile_args,
3241
dependencies: recordings_lib.get('deps'),
3342
version: meson.project_version(),
3443
)
@@ -48,7 +57,7 @@ pkg.generate(
4857
name: 'oopetris-recordings',
4958
filebase: 'oopetris-recordings',
5059
subdirs: 'oopetris',
51-
extra_cflags: recordings_lib.get('compile_args'),
60+
extra_cflags: recordings_dep_compile_args,
5261
variables: ['compiler=' + pkg_cpp_compiler, 'cpp_stdlib=' + pkg_cpp_stdlib],
5362
)
5463

0 commit comments

Comments
 (0)