glfw: make platform-specific e.g. vulkan-headers dependencies optional #863
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#863
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is it possible to remove the
@cDefine("GLFW_INCLUDE_VULKAN", "1");from the glfw implementation or add an option to include it? I don't want to use Vulkan and when compiling it complains about:include/GLFW/glfw3.h:111:12: error: 'vulkan/vulkan.h' file not foundvulkan is dynamically linked so you are not compiling it. but i agree that must be a build option
All you need is the headers, which we include as a dependency so you don't need to install them on your system or anything. Right now we've switched to the Zig package manager and things are a bit rough, see https://github.com/hexops/mach/issues/861#issuecomment-1638185447 for how to set up mach-glfw for use today.
Once you do that, the package manager will download/build Vulkan headers for you - but otherwise they won't be used and your program doesn't need to actually use Vulkan at all (you can just use OpenGL or whatever.)
Thanks for the info. I already use the zon file. I used some code from the Vulkan mach glfw example repo.
For me it is also a bit more complex as I have a lib which uses mach-glfw and my main exe uses that lib. I almost managed to setup all the build stuff but it wasn't very intuitive. But this is more about zig and not your project.
I will have a closer look at your links and try to make it work.
https://github.com/hexops/mach/issues/1166#issuecomment-2212962722