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 - Project fails to build with CMake when DirectFB backend is enabled
Summary: Project fails to build with CMake when DirectFB backend is enabled
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.12
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-18 14:46 UTC by Simon Zeni
Modified: 2020-12-18 15:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.