Merge branch 'ebassi/build-fixes' into 'main'

build: Replace source_root()

See merge request GNOME/gtk!4281
This commit is contained in:
Emmanuele Bassi
2021-12-25 17:26:06 +00:00
10 changed files with 21 additions and 19 deletions

View File

@@ -17,7 +17,7 @@ executable('gtk4-constraint-editor',
c_args: common_cflags,
dependencies: libgtk_dep,
include_directories: confinc,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: false,
)

View File

@@ -242,7 +242,7 @@ executable('gtk4-demo',
c_args: gtkdemo_args + demo_cflags,
dependencies: gtkdemo_deps,
include_directories: confinc,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: true,
)
@@ -252,7 +252,7 @@ executable('gtk4-demo-application',
c_args: gtkdemo_args + common_cflags,
dependencies: gtkdemo_deps,
include_directories: confinc,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: true,
)

View File

@@ -16,7 +16,7 @@ executable('gtk4-icon-browser',
c_args: common_cflags,
dependencies: [ libgtk_dep, demo_conf_h ],
include_directories: confinc,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: true,
)

View File

@@ -3,7 +3,7 @@ demo_profile = get_option('profile')
demo_conf_h = declare_dependency(
sources: custom_target('demo-header',
command: [gen_demo_header, meson.source_root(), demo_profile],
command: [gen_demo_header, meson.project_source_root(), demo_profile],
capture: true,
output: 'demo_conf.h',
build_by_default: true,

View File

@@ -17,7 +17,7 @@ executable('gtk4-node-editor',
c_args: [
'-DNODE_EDITOR_SOURCE_DIR="@0@/../../testsuite/gsk/compare/"'.format(meson.current_source_dir())
] + common_cflags,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: false,
)

View File

@@ -3,7 +3,7 @@ executable('gtk4-print-editor',
c_args: common_cflags,
dependencies: [ libgtk_dep, demo_conf_h ],
include_directories: confinc,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: true,
)

View File

@@ -74,7 +74,7 @@ executable('gtk4-widget-factory',
c_args: common_cflags,
dependencies: [ libgtk_dep, demo_conf_h ],
include_directories: confinc,
gui_app: true,
win_subsystem: 'windows',
link_args: extra_demo_ldflags,
install: true,
)

View File

@@ -1101,7 +1101,7 @@ if harfbuzz_dep.found() and pangoft_dep.found()
endif
if x11_enabled
x11_data_prefix = dependency('x11').get_pkgconfig_variable('prefix')
x11_data_prefix = dependency('x11').get_variable(pkgconfig: 'prefix')
gtk_cargs += [ '-DX11_DATA_PREFIX="@0@"'.format(x11_data_prefix), ]
gtk_sources += gtk_x11_sources

View File

@@ -456,7 +456,7 @@ colord_dep = dependency('colord', version: '>= 0.1.9', required: get_option('col
cdata.set('HAVE_COLORD', colord_dep.found())
if iso_codes_dep.found()
cdata.set_quoted('ISO_CODES_PREFIX', iso_codes_dep.get_pkgconfig_variable('prefix'))
cdata.set_quoted('ISO_CODES_PREFIX', iso_codes_dep.get_variable(pkgconfig: 'prefix'))
else
cdata.set_quoted('ISO_CODES_PREFIX', '/usr')
endif
@@ -515,7 +515,7 @@ if wayland_enabled
if not wlprotocolsdep.found()
wlproto_dir = subproject('wayland-protocols').get_variable('wayland_protocols_srcdir')
else
wlproto_dir = wlprotocolsdep.get_pkgconfig_variable('pkgdatadir')
wlproto_dir = wlprotocolsdep.get_variable(pkgconfig: 'pkgdatadir')
endif
wayland_pkgs = [
@@ -709,8 +709,8 @@ endif
graphene_dep_type = graphene_dep.type_name()
if graphene_dep_type == 'pkgconfig'
graphene_has_sse2 = graphene_dep.get_pkgconfig_variable('graphene_has_sse2') == '1'
graphene_has_gcc = graphene_dep.get_pkgconfig_variable('graphene_has_gcc') == '1'
graphene_has_sse2 = graphene_dep.get_variable(pkgconfig: 'graphene_has_sse2') == '1'
graphene_has_gcc = graphene_dep.get_variable(pkgconfig: 'graphene_has_gcc') == '1'
else
graphene_simd = subproject('graphene').get_variable('graphene_simd')
graphene_has_sse2 = graphene_simd.contains('sse2')

View File

@@ -2,11 +2,13 @@ py = import('python').find_installation('python3', modules: ['gi'])
env = environment()
env.prepend('GI_TYPELIB_PATH',
join_paths(project_build_root, 'gtk'),
gi_dep.get_pkgconfig_variable('typelibdir'))
env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so'))
project_build_root / 'gtk',
gi_dep.get_variable(pkgconfig: 'typelibdir'),
)
env.prepend('LD_PRELOAD', project_build_root / 'gtk' / 'libgtk-4.so')
test('api',
find_program('api.py', dirs: meson.current_source_dir()),
suite: ['introspection'],
env: env)
find_program('api.py', dirs: meson.current_source_dir()),
suite: ['introspection'],
env: env,
)