mickelson / sfml-pi

SFML on Linux without X11 using DRM/KMS (or dispmanx on RPi0-3)
Other
62 stars 26 forks source link

CMake: Pi: update to new vendor library name #7

Closed psyke83 closed 6 years ago

psyke83 commented 6 years ago

This will allow compatibility with Raspbian stretch, and continues working on recent jessie firmwares (1.20160921-1 or later)

mickelson commented 6 years ago

Thanks for this.

I am concerned with this breaking the build for people that still have the older raspberry pi firmware. Could you tweak the change to Graphics/CMakeLists.txt so that if GLES2_LIBRARY is set to GLES2_LIBRARY-NOTFOUND after the find_library call then you run find_library again against the old GLES2 library (GLESv2)? (I'm looking at https://cmake.org/cmake/help/v3.0/command/find_library.html to see what happens if find_library doesn't find anything)

psyke83 commented 6 years ago

I'll update that for you when I'm free in a few hours - no problem. The complementing PR will also need to be modified: https://github.com/mickelson/attract/pull/387

Any suggestions on how to evaluate the presence of libraries via a Makefile? We have noted some odd interactions when the usage of libbrcmGLESv2 and libGLESv2 are mixed between shared libraries (mupen64plus and its interaction with plugins and SDL2).

Currently, only the latest stretch firmware package includes pkgconfig for the vendor libraries, but it's in /opt/vc/lib/pkgconfig, which requires users to set the PKG_CONFIG_PATH environment variable manually. We set this in RetroPie-Setup's scripts automatically (and also do it for jessie with fallback pkgconfig).

psyke83 commented 6 years ago

I've refreshed the two PRs to provide a fallback mechanism - hopefully it's acceptable for you.

Once you've merged them, I'll merge the RetroPie PR to fix building. But if you see any issues with the build flags, I'd appreciate if you let me know: https://github.com/RetroPie/RetroPie-Setup/pull/2213

Thanks.

mickelson commented 6 years ago

Looks good, thanks!