@@ -22,18 +22,10 @@ liboopetris_core = library(
2222 install : true ,
2323)
2424
25- ## remove '-stdlib=libc++' from the list, if it's present
26- core_dep_compile_args = []
27- foreach value : core_lib.get(' compile_args' )
28- if value != ' -stdlib=libc++'
29- core_dep_compile_args += value
30- endif
31- endforeach
32-
3325liboopetris_core_dep = declare_dependency (
3426 link_with : liboopetris_core,
3527 include_directories : core_lib.get(' inc_dirs' ),
36- compile_args : core_dep_compile_args ,
28+ compile_args : core_lib.get( ' compile_args ' ) ,
3729 dependencies : core_lib.get(' deps' ),
3830 version : meson .project_version(),
3931)
@@ -45,6 +37,14 @@ install_headers(
4537 preserve_path : true ,
4638)
4739
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+
4848# generate pkgconfig files
4949pkg = import (' pkgconfig' )
5050
@@ -54,7 +54,8 @@ pkg.generate(
5454 name : ' oopetris-core' ,
5555 filebase : ' oopetris-core' ,
5656 subdirs : ' oopetris' ,
57- extra_cflags : core_lib.get(' compile_args' ),
57+ extra_cflags : core_dep_compile_args,
58+ variables : [' compiler=' + pkg_cpp_compiler, ' cpp_stdlib=' + pkg_cpp_stdlib],
5859)
5960
6061# setting this to strings, so += {...} gets detected as an error, if it is done after that
0 commit comments