diff --git a/meson.build b/meson.build index 8ed256ecf3a8a8f035ed2e09ee294ed00dc30593..66a24f076bb46ef3e8fb51aa25a6e182caefe1da 100644 --- a/meson.build +++ b/meson.build @@ -58,28 +58,28 @@ gmobile_dep = dependency('gmobile', embed_wlroots = get_option('embed-wlroots') if not embed_wlroots.disabled() - # Try first to find wlroots as a subproject, then as a system dependency - wlroots_proj = subproject( - 'wlroots', - default_options: ['examples=false', 'renderers=gles2'], - required: false, - ) - - if embed_wlroots.enabled() and not wlroots_proj.found() - error('Wlroots subproject not found but enabled') - endif + # Try first to find wlroots as a subproject, then as a system dependency + wlroots_proj = subproject( + 'wlroots', + default_options: ['examples=false', 'renderers=gles2'], + required: false, + ) + + if embed_wlroots.enabled() and not wlroots_proj.found() + error('Wlroots subproject not found but enabled') + endif endif if not embed_wlroots.disabled() and wlroots_proj.found() - wlroots = wlroots_proj.get_variable('wlroots') + wlroots = wlroots_proj.get_variable('wlroots') else - wlroots = dependency('wlroots', version: ['>= 0.17.0', '< 0.18.0']) + wlroots = dependency('wlroots', version: ['>= 0.17.0', '< 0.18.0']) endif wlroots_has_xwayland = wlroots.get_variable(pkgconfig: 'have_xwayland', internal: 'have_xwayland') == 'true' if get_option('xwayland').enabled() and not wlroots_has_xwayland - error('Cannot enable Xwayland in phoc: wlroots has been built without Xwayland support') + error('Cannot enable Xwayland in phoc: wlroots has been built without Xwayland support') endif have_xwayland = get_option('xwayland').enabled() @@ -187,11 +187,12 @@ configure_file( summary({ 'wlroots version': wlroots.version(), - 'wlroots as submodule': not embed_wlroots.disabled() and wlroots_proj.found(), + 'wlroots as subproject': not embed_wlroots.disabled() and wlroots_proj.found(), 'Xwayland': have_xwayland, 'Documentation': get_option('gtk_doc'), 'Manual pages': get_option('man'), 'Tracing': use_dtrace, + 'Tests': get_option('tests'), }, bool_yn: true, section: 'Build', diff --git a/src/meson.build b/src/meson.build index 62cb63f6111078474f836032553494a0f81323d4..95c51e3f038ab9300a5d079ccb6f212993fd9877 100644 --- a/src/meson.build +++ b/src/meson.build @@ -109,13 +109,20 @@ sources = files( 'xdg-toplevel-decoration.c', 'xdg-toplevel-decoration.h', ) + phoc_anim_sources + libphoc_generated_sources = [ + phoc_anim_enum_sources[0], + phoc_enum_sources[0], + phoc_marshalers[0], + protos_sources, +] + +libphoc_generated_headers = [ phoc_config_h, - phoc_anim_enum_sources, - phoc_enum_sources, - phoc_marshalers, + phoc_anim_enum_sources[1], + phoc_enum_sources[1], + phoc_marshalers[1], server_protos_headers, - protos_sources, ] phoc_deps = [ @@ -145,6 +152,7 @@ phoc_lib = both_libraries( 'phoc', sources, libphoc_generated_sources, + libphoc_generated_headers, include_directories: phoc_anim_inc, dependencies: phoc_deps, install: false, @@ -156,7 +164,7 @@ libphoc_dep = declare_dependency( protocol_inc], link_with: phoc_lib, dependencies: phoc_deps, - sources: libphoc_generated_sources) + sources: libphoc_generated_headers) libphoc_static_dep = declare_dependency( include_directories: [include_directories('.'), @@ -164,7 +172,7 @@ libphoc_static_dep = declare_dependency( protocol_inc], link_with: phoc_lib.get_static_lib(), dependencies: phoc_deps, - sources: libphoc_generated_sources) + sources: libphoc_generated_headers) if get_option('gtk_doc') phoc_gir_extra_args = [ diff --git a/tests/meson.build b/tests/meson.build index 900c765ee40de114870c7de28303d0acae9ed90a..71b141fdc2c107cb4598eb7791bd4104dbceb30f 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -56,7 +56,12 @@ phoctest_sources = [ 'testlib-layer-shell.c', ] -phoctest_lib = static_library('phoctest', phoctest_sources, client_protos_headers, +phoctest_lib = static_library('phoctest', + [ + phoctest_sources, + client_protos_headers, + protos_sources, + ], c_args: test_cflags, dependencies: [libphoc_dep, wayland_client])