Skip to content

Commit

Permalink
Meson: add tracy dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Sep 22, 2024
1 parent 2c0b65f commit c5fda65
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -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')
7 changes: 5 additions & 2 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ in

mesonBuildType =
if debug
then "debug"
then "debugoptimized"
else "release";

# we want as much debug info as possible
Expand All @@ -159,7 +159,10 @@ in
"legacy_renderer" = legacyRenderer;
"systemd" = withSystemd;
})
(mesonBool "b_pch" false)
(mapAttrsToList mesonBool {
"b_pch" = false;
"tracy_enable" = false;
})
];

postInstall = ''
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions subprojects/tracy.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[wrap-file]

0 comments on commit c5fda65

Please sign in to comment.