We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5403

Summary: Project fails to build with CMake when DirectFB backend is enabled
Product: SDL Reporter: Simon Zeni <simon>
Component: buildAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: flibitijibibo
Version: 2.0.12   
Hardware: x86_64   
OS: Linux   

Description Simon Zeni 2020-12-18 14:46:37 UTC
On Alpinelinux, where the DirectFB backend is enabled in the package itself (https://git.alpinelinux.org/aports/tree/community/sdl2/APKBUILD#n53), several CMake projects that uses SDL2's SDL2Targets.cmake will fail to build with the following error

In file included from /home/simon/dev/FNA3D/src/FNA3D_Driver_OpenGL.c:33:
/usr/include/SDL2/SDL_syswm.h:80:10: fatal error: directfb.h: No such file or directory
   80 | #include <directfb.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/FNA3D.dir/build.make:108: CMakeFiles/FNA3D.dir/src/FNA3D_Driver_OpenGL.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/simon/dev/FNA3D/src/FNA3D_Driver_Vulkan.c:36:
/usr/include/SDL2/SDL_syswm.h:80:10: fatal error: directfb.h: No such file or directory
   80 | #include <directfb.h>
      |          ^~~~~~~~~~~~
compilation terminated.

The build is successful if SDL2 is found through pkgconfig.