Skip to content

Commit

Permalink
Build mangohud_opengl only in unixy environments
Browse files Browse the repository at this point in the history
Signed-off-by: Alfred Wingate <parona@protonmail.com>
  • Loading branch information
parona-source committed Dec 27, 2024
1 parent 49a6501 commit ae83e08
Showing 1 changed file with 46 additions and 47 deletions.
93 changes: 46 additions & 47 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -230,56 +230,55 @@ mangohud_shared_lib = shared_library(
install: true
)

mangohud_opengl_syms = configuration_data()
if get_option('with_x11').enabled()
mangohud_opengl_syms.set('x11_symbols', 'glX*; mangohud_find_glx_ptr;')
endif
if get_option('with_wayland').enabled()
mangohud_opengl_syms.set('wayland_symbols', 'egl*; mangohud_find_egl_ptr;')
endif
if is_unixy
mangohud_opengl_syms = configuration_data()
if get_option('with_x11').enabled()
mangohud_opengl_syms.set('x11_symbols', 'glX*; mangohud_find_glx_ptr;')
endif
if get_option('with_wayland').enabled()
mangohud_opengl_syms.set('wayland_symbols', 'egl*; mangohud_find_egl_ptr;')
endif

mangohud_opengl_version_file = configure_file(
input: 'mangohud_opengl.version.in',
output: 'mangohud_opengl.version',
configuration: mangohud_opengl_syms,
)
mangohud_opengl_version_file = configure_file(
input: 'mangohud_opengl.version.in',
output: 'mangohud_opengl.version',
configuration: mangohud_opengl_syms,
)

mangohud_opengl_shared_lib = shared_library(
'MangoHud_opengl',
mangohud_version,
opengl_files,
vklayer_files,
util_files,
c_args : [
pre_args,
vulkan_wsi_args
],
cpp_args : [
pre_args,
vulkan_wsi_args
],
dependencies : [
mangohud_version_dep,
vulkan_wsi_deps,
dearimgui_dep,
spdlog_dep,
dbus_dep,
dep_dl,
dep_rt,
dep_pthread,
dep_vulkan,
windows_deps,
json_dep,
implot_dep],
include_directories : [inc_common],
link_args : [link_args, '-Wl,--version-script,@0@'.format(join_paths(meson.current_build_dir(), 'mangohud_opengl.version'))],
link_with: mangohud_static_lib,
link_depends: mangohud_opengl_version_file,
install_dir : libdir_mangohud,
install: true
)
mangohud_opengl_shared_lib = shared_library(
'MangoHud_opengl',
mangohud_version,
opengl_files,
vklayer_files,
util_files,
c_args : [
pre_args,
vulkan_wsi_args
],
cpp_args : [
pre_args,
vulkan_wsi_args
],
dependencies : [
mangohud_version_dep,
vulkan_wsi_deps,
dearimgui_dep,
spdlog_dep,
dbus_dep,
dep_dl,
dep_rt,
dep_pthread,
dep_vulkan,
json_dep,
implot_dep],
include_directories : [inc_common],
link_args : [link_args, '-Wl,--version-script,@0@'.format(join_paths(meson.current_build_dir(), 'mangohud_opengl.version'))],
link_with: mangohud_static_lib,
link_depends: mangohud_opengl_version_file,
install_dir : libdir_mangohud,
install: true
)

if is_unixy
mangohud_dlsym = shared_library(
'MangoHud_dlsym',
files(
Expand Down

0 comments on commit ae83e08

Please sign in to comment.