-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use system openhmd instead of submodule #82
Comments
If you're using the meson build, you can comment out this line and it will use an external OpenHMD:
Make it:
|
I fail to see how that would conceptually work -- the very next line references This is trivial to solve, but it would require following the documentation printed out twice as sandbox violation warnings in the build. |
Sorry - I was looking at my fork and forgot that I didn't merge some changes back here. thaytan@087aa4c changes the OpenHMD subproject setup |
That's a good start, but please delete the line: openhmd_subproject = subproject('openhmd', default_options: ['default_library=static']) and move Using a call to |
Thanks, that sounds cleaner. I guess I missed that I could pass |
This was a quick hack I put in a long, long time ago. You can also look at how how sway handles the wlroots subproject for a more decent example |
Right, I discussed the swaywm handling with them too. :D In their case, the two are developed together and also different wayland projects apparently require different ABI editions of wlroots 😱 and it's not the ecosystem custom 😱 to maintain support for multiple versions via |
something like project(
'steamvr-openhmd', 'cpp',
default_options : 'cpp_std=c++11',
version : '0.0.1',
meson_version: '>=0.54'
)
sources = [
'driverlog.cpp',
'driverlog.h',
'driver_openhmd.cpp'
]
host_system = host_machine.system()
if host_system == 'windows'
dep_openhmd = dependency('openhmd', static: true)
else
dep_openhmd = dependency('openhmd')
endif
deps = [
dependency('openvr').partial_dependency(includes: true, compile_args: true),
dep_openhmd,
dependency('threads')
]
steamvr_openhmd_lib = library(
'driver_openhmd', sources,
dependencies : deps,
install : true,
version : meson.project_version(),
name_prefix : ''
) ? use also system openvr (only use the headers and not link with library). and use openhmd as shared in linux, and static in windows |
do you want to make a pull request? |
then is ok? |
Does the |
Well, it finds the system version which works... you'd need to set the subproject up as a wrap obviously, in order to do fallback. |
That's what I thought. There's no such thing as a system version of the openvr header - exactly the bundled version needs to be pulled in. It should probably just be moved out of the |
What an interesting claim to make. I have one, clearly there is such thing as it.
Requiring an exact version is a different story, of course. But you can do that with Meson too, see the
But it is literally another project developed and shipped separately, or at least the subset of that project's release snapshots that you actually make use of. Why shouldn't it semantically be a subproject? |
Interesting. Arch must be the only distro that ships one.
Yes, it's a big waste of space and downloads when we need exactly one header, and exactly the version of it that the driver is currently targetted at.
As above. |
Debian ships one too, as does OpenSUSE.
Making a single-file subproject wrap for a single-file check-your-dependencies-into-git seems perfectly reasonable and not at all related to the space and downloads.
This ensures that vendored code is clearly delineated, does not get lost inside the project sources, and has a clear provenance for e.g. the version. It also means that you can isolate upstream changes into an interface export, and handle syncing that separately from your own project sources in the event that upstream does internal refactoring. |
Interesting - I obviously didn't realise distros were doing that. How does it work? The apps compile against OpenVR but can't use it until the SteamVR runtime is installed?
OK, that makes sense. |
Hi
is possible use and link with system openhmd instead of pull and build again from submodule?
greetings
The text was updated successfully, but these errors were encountered: