ValveSoftware / gamescope

SteamOS session compositing window manager
Other
3.12k stars 210 forks source link

meson can't find openvr via pkg-config #752

Open colemickens opened 1 year ago

colemickens commented 1 year ago

Hi,

I'm working with nixpkgs, trying to stay ahead of gamescope releases so I can stage other things (for example, we need to package openvr sdk, newer sdl2, etc for unreleased gamescope).

I'm noticing now, even if I build openvr at the tip of tree with fixed build, gamescope's build process fails to find it.

Is it possible that the dep name is wrong? I don't see openvr_api occur in the openvr CMakeLists for example

colemickens commented 1 year ago

It also sort of looks like maybe references to the direct subproject files were added. If I try to patch this myself, then I hit:

│../src/vr_session.hpp:10:10: fatal error: ../subprojects/openvr/headers/openvr.h: No such file or directory                                                                         │
│   10 | #include "../subprojects/openvr/headers/openvr.h"                                                                                                                           │
│      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
colemickens commented 1 year ago

I have a couple of patches that get the package building for me, can't test VR e2e right now though:

 postPatch = ''
    sed -i "s/dependency('openvr_api',/dependency('openvr',/g" 'meson.build'
    sed -i 's|"../subprojects/openvr/headers/openvr.h"|<openvr.h>|g' src/vr_session.hpp
  '';
Scrumplex commented 1 year ago

I think I fixed this in these PRs: #811 #813

Scrumplex commented 1 year ago

I was also working on preparing for an update in Nixpkgs here: https://github.com/NixOS/nixpkgs/pull/219548