Commit Graph

40 Commits

Author SHA1 Message Date
FlightlessMango
ed8b08c676 meson options: notify 2023-10-06 02:20:00 +02:00
FlightlessMango
381c519631 meson: disable mangoapp by default
[skip ci]
2023-06-15 06:13:08 +02:00
FlightlessMango
801b5ef5fc mangoapp: install by default
[skip ci]
2023-06-13 18:54:04 +02:00
Emil Velikov
bc282cf300 meson: remove use_system_vulkan/vulkan_datadir
Newer versions of the XML and headers don't play nice. In particular the
VK_LAYER_EXPORT macro was removed and the XML was reworked quite
significantly, so our generator no longer works.

I was able to port newer version of the generator scripts from Mesa
(where these were copied from originally), although these new scripts
don't work with the old XML.

Just drop the meson knobs and always use the subproject version. In
practical terms this is identical to what Mesa also does... So Debian
DFSG should not be _too_ upset.

Closes: https://github.com/flightlessmango/MangoHud/issues/927
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-04-02 22:17:12 +02:00
Emil Velikov
f47f777e26 meson: unwrap ld_libdir_mangohud handling, remove ld_libdir_abs
Currently we have ld_libdir_abs which defaults to false. In that case,
both the mangohud shell wrapper, as well as the json files, reference
the DSOs directly without any path component.

This means that at run-time the dynamic linker, vulkan loader as well as
pressure-vessel will need to jump through hoops and figure out the
bitness of the DSO, whether one wants the 32 or 64bit one and even then
there will be confusing messages like:

fatal: /usr/lib/libMangoHud.so: wrong ELF class: ELFCLASS32

When set to true, as seen in the in-tree build.sh we'll append empty
path to LD_LIBRARY_PATH (bad), the full path with the $LIB token will be
used with LD_PRELOAD (good) and json files (bad).

Since we are generating separate json files, we can use the actual path
(while $LIB currently works, it's not really strict json nor documented
as supported). We can also drop the dubious LD_LIBRARY_PATH manipulation

This basically reinstates the prepend_libdir_vk=true option that was
dropped earlier.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
dd374d4c9e meson: remove prepend_libdir_vk option
The option is always true for all distributions that build Mangohud.
While only the in-tree PKGBUILD disables it for undocumented reasons.

In practise the option will be enabled across the board - in different
manner, with latter commit. But for now, just remove it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
def59db953 meson: remove ld_libdir_prefix option
The option defaults to false in-tree and across all distributions. The
only alleged use-case is the build.sh/build-srt.sh scripts. Although the
output of those scripts is absolutely identical with or w/o the flag.

Remove it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-13 21:53:27 +01:00
Emil Velikov
221d335006 meson: remove mangoapp_32bit option
Was introduced as a means to shorten the build cycles. With the static
lib helper it should no longer be needed.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 22:23:35 +02:00
Emil Velikov
8a1c56ba25 meson: remove broken -Dwith_dlsym
The option does not even build, so let's remove it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-03-04 21:17:28 +02:00
FlightlessMango
dbe2f010a2 Don't build mangoapp by default 2023-01-17 15:20:42 +01:00
FlightlessMango
6f23cdeaf1 mangoapp: meson option to install lib32 2023-01-10 13:38:05 +01:00
FlightlessMango
8d064db204 mangoapp: install by default 2023-01-10 13:37:34 +01:00
wael
9a6809daca meson_options: fix bool options 2022-09-21 09:30:14 +02:00
jackun
50720d2215
Install data files only if include_doc option is set 2022-07-14 15:32:05 +03:00
Stephan Lachnit
2dfdb9b584
add metainfo file
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2022-07-13 21:08:28 +03:00
jackun
11142b5b2c
Merge pull request #703 from evelikov/misc-mixes
Remove libdrm_amdgpu and other unnecessary code
2022-03-15 19:47:48 +02:00
FlightlessMango
b064f47d66 mangoapp: vulkan layer 2022-03-14 19:49:20 +01:00
Emil Velikov
68ce8f81cc Remove libdrm_amdgpu metrics
There are two alternatives - hwmon entries and gpu_metrics sysfs file.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2022-03-12 10:28:18 +00:00
FlightlessMango
e9d4eeff04 mangohudctl meson option 2022-01-21 10:42:30 +01:00
FlightlessMango
cd215854ce Mangoapp: meson option 2021-10-18 17:50:58 +02:00
jackun
a82e27d978
Use spdlog macros so logging can be completely disabled during compile-time 2021-07-27 16:16:39 +03:00
jackun
2f807a4c0d
Add spdlog wrap and logging 2021-07-16 04:06:09 +03:00
jackun
c093f9823e
Use libdrm_amdgpu for amdgpu sensor info, if available
Using plain `open` as `drmOpen` needs bus id check which needs interface 1.4 ioctl which gives EPERM cause only DRM_MASTER can call it :(

https://github.com/clbr/radeontop/issues/48#issuecomment-493792404
2021-07-13 19:54:24 +03:00
Kira Bruneau
d8a1ddf253
meson: Add vulkan_datadir option (#522)
This option enables using system Vulkan headers when it doesn't share
the same datadir as MangoHud. This is specifically an issue in NixOS
where packages are built into their own isolated directories in
/nix/store.

For example:
/nix/store/9g28nz6zh484144mzw670bx82y1ka49a-vulkan-headers-1.2.162.0/share/vulkan/registry/vk.xml

This is currently worked around in the Nix package, by symlinking the
vulkan-headers into MangoHud's install directory:

5debc57760/pkgs/tools/graphics/mangohud/default.nix (L66-L70)

Although, this hack causes the vulkan-headers to be included as a
runtime dependency when they're only needed at build time.

I tried to figure out a way to resolve the datadir automatically, but
found that just adding a new option is probably the best solution for
the following reasons:

- The vulkan.pc file used to resolve dep_vulkan doesn't contain any
information about the datadir.

- The share directory could be resolved relative to the vulkan include
directory and that would solve the specific issue for Nix, but the
datadir could be installed anywhere and that wouldn't be a general
solution.

- I couldn't find a way to resolve the data dir using the XDG Base
Directory Specification because meson doesn't provide a way to access
the necessary environment variables.

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
2021-05-11 18:44:25 +03:00
jackun
47865573a8
Add option to prepend libdir to library's path in vulkan manifest
"\$LIB" technically breaks json but on the other hand vulkan loader
currently doesn't handle "\\$LIB"
Help with issue #468
2021-04-18 23:03:24 +03:00
jackun
6a5cd38127
Meson option to have absolute paths in LD_PRELOAD 2020-11-27 17:44:22 +02:00
jackun
a173989b1c
Make build.sh compatible with \$LIB 2020-08-04 19:51:00 +03:00
Stephan Lachnit
d956f60f86 remove old system nvml build option
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-06-12 13:37:12 +03:00
jackun
953c8d0e0f
Add meson option with_nvml 2020-06-09 13:44:41 +03:00
Sporif
61ef9244e9 Disable dlsym hooking by default and fix LD_PRELOAD propagation to new processes
This allows `mangohud steam` to work
2020-04-18 17:53:41 +01:00
FlightlessMango
d6314da8b2 Merge branch 'master' into develop 2020-04-11 22:49:50 +02:00
Stephan Lachnit
f860418e7e
Allow system NVML to be used
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-04-10 11:33:58 +02:00
jackun
8024736253
Add DBus loader, combined ticker for Spotify metadata 2020-04-04 23:50:57 +03:00
Danilo Spinella
0373383581
Add x11/wayland feature switches, rename 'use_xnvctrl' to 'with_xnvctrl' 2020-04-01 11:39:57 +03:00
jackun
049e960589
Add 'use_xnvctrl' feature to allow building without libXNVCtrl support 2020-03-30 22:48:56 +03:00
FlightlessMango
71b602751d [meson] option to include_doc 2020-03-15 16:01:08 +01:00
jackun
ad64bf345d
Update build scripts, again
Install to $prefix$libdir/mangohud by default.
2020-03-14 12:59:43 +02:00
jackun
f99129f9de
Libdirs: once more, with feeling 2020-03-11 18:11:35 +02:00
Danilo Spinella
18edd4eb50 meson: Add option to use system vulkan headers 2020-02-13 21:47:50 +02:00
jackun
6400ab3cdc
meson: option to add _GLIBCXX_ASSERTIONS define 2020-02-04 23:23:01 +02:00