Meson: add tracy dependency

This commit is contained in:
Mihai Fufezan 2024-09-22 20:53:34 +03:00
parent be96787ed0
commit f75f8efb1b
5 changed files with 14 additions and 2 deletions

View File

@ -73,6 +73,12 @@ foreach file : headers
install_headers(file, subdir: 'hyprland', preserve_path: true) install_headers(file, subdir: 'hyprland', preserve_path: true)
endforeach endforeach
tracy = dependency('tracy', static: true, required: get_option('tracy_enable'))
if get_option('tracy_enable') and get_option('buildtype') != 'debugoptimized'
warning('Profiling builds should set -- buildtype = debugoptimized')
endif
subdir('protocols') subdir('protocols')
subdir('src') subdir('src')
subdir('hyprctl') subdir('hyprctl')

View File

@ -1,3 +1,4 @@
option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications') option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')
option('systemd', type: 'feature', value: 'auto', description: 'Enable systemd integration') option('systemd', type: 'feature', value: 'auto', description: 'Enable systemd integration')
option('legacy_renderer', type: 'feature', value: 'disabled', description: 'Enable legacy renderer') option('legacy_renderer', type: 'feature', value: 'disabled', description: 'Enable legacy renderer')
option('tracy_enable', type: 'boolean', value: false , description: 'Enable profiling')

View File

@ -144,7 +144,7 @@ in
mesonBuildType = mesonBuildType =
if debug if debug
then "debug" then "debugoptimized"
else "release"; else "release";
# we want as much debug info as possible # we want as much debug info as possible
@ -156,7 +156,10 @@ in
"legacy_renderer" = legacyRenderer; "legacy_renderer" = legacyRenderer;
"systemd" = withSystemd; "systemd" = withSystemd;
}) })
(mesonBool "b_pch" false) (mapAttrsToList mesonBool {
"b_pch" = false;
"tracy_enable" = false;
})
]; ];
postInstall = '' postInstall = ''

View File

@ -31,6 +31,7 @@ executable(
backtrace_dep, backtrace_dep,
epoll_dep, epoll_dep,
gio_dep, gio_dep,
tracy,
# Try to find canihavesomecoffee's udis86 using pkgconfig # Try to find canihavesomecoffee's udis86 using pkgconfig
# vmt/udis86 does not provide a .pc file and won't be detected this way # vmt/udis86 does not provide a .pc file and won't be detected this way

1
subprojects/tracy.wrap Normal file
View File

@ -0,0 +1 @@
[wrap-file]