With the introduction of the static library, we forgot the version
script. As a result we were spilling all the internal symbols.
Fixes: d4aa74c ("Create static and shared libs separately")
Closes: https://github.com/flightlessmango/MangoHud/issues/933
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
The library does not honour the correct install location. Seems like it
was broken for a while and I didn't catch it with my recent rework...
Since all the scripts flip the default "true" to "false" 🤦
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently we list the custom_target (aka vcs_tag() as part of the
sources. Although since it's not an explicit dependency meson/ninja are
free to compile the C/C++ files, before the file is generated.
Closes: https://github.com/flightlessmango/MangoHud/issues/862
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
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>
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>
This will allow us to remove the $LIB from the json files and simplify
the related lib handling.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
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>
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>
There's nothing C++ in there, so rename the file appropriately.
While in there, use C99 initializers, annotate static functions as
such and pull the implicit stdbool.h.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This makes the installation path adapt correctly to the value of
the append_libdir_mangohud option, which defaults to putting it in a
subdirectory ${libdir}/mangohud. Without this, the path in the JSON
manifest (which does respect append_libdir_mangohud) is inconsistent
with the actual location of the library.
Resolves: https://github.com/flightlessmango/MangoHud/issues/795
Co-authored-by: Simon McVittie <smcv@collabora.com>