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)
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('src')
subdir('hyprctl')

View File

@ -1,3 +1,4 @@
option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')
option('systemd', type: 'feature', value: 'auto', description: 'Enable systemd integration')
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 =
if debug
then "debug"
then "debugoptimized"
else "release";
# we want as much debug info as possible
@ -156,7 +156,10 @@ in
"legacy_renderer" = legacyRenderer;
"systemd" = withSystemd;
})
(mesonBool "b_pch" false)
(mapAttrsToList mesonBool {
"b_pch" = false;
"tracy_enable" = false;
})
];
postInstall = ''

View File

@ -31,6 +31,7 @@ executable(
backtrace_dep,
epoll_dep,
gio_dep,
tracy,
# Try to find canihavesomecoffee's udis86 using pkgconfig
# 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]