bkaradzic / bgfx.cmake

CMake build scripts for bgfx. Released under public domain.
Creative Commons Zero v1.0 Universal
209 stars 110 forks source link

Is it possible to define WL_EGL_PLATFORM through bgfx.cmake? #232

Closed Gaspard-- closed 3 months ago

Gaspard-- commented 4 months ago

Hello !

Is it possible to define WL_EGL_PLATFORM through bgfx.cmake?

I tried looking at the source, yet I can't find any reference to this define. Maybe I missed a way to set it directly?

If it's currently not possible it makes using bgfx.cmake on linux a little complicated. I'm also not an expert at cmake so I may be approaching this the wrong way.

Gaspard-- commented 4 months ago

I worked around the issue used this snippet for anyone having a similar issue:

target_compile_definitions(bgfx PRIVATE WL_EGL_PLATFORM)
bwrsandman commented 4 months ago

I guess we could add an option called BGFX_CONFIG_WITH_WAYLAND for this in the cmake that optionally sets that define.