Skip to content

Commit

Permalink
package/sdl2: remove sdl2-config.cmake
Browse files Browse the repository at this point in the history
We are using autotools build system for sdl2, so the sdl2-config.cmake
include path are not resolved like for sdl2-config script [1].
Remove sdl2-config.cmake file and avoid unsafe include path if this
file is used by a cmake based package.

This trigger an issue with ogre 1.12.6 package that replaced
FindSDL2.cmake by sdl2-config.cmake [2].

Thanks to Pavel Rojtberg for the help [3].

[1] https://bugzilla.libsdl.org/show_bug.cgi?id=4597
[2] OGRECave/ogre@6de6f9b
[3] OGRECave/ogre#1568

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  • Loading branch information
RomainNaour authored and celaxodon committed Oct 1, 2020
1 parent 3994b04 commit b27076d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package/sdl2/sdl2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ SDL2_CONF_OPTS += \
--disable-pulseaudio \
--disable-video-wayland

# We are using autotools build system for sdl2, so the sdl2-config.cmake
# include path are not resolved like for sdl2-config script.
# Remove sdl2-config.cmake file and avoid unsafe include path if this
# file is used by a cmake based package.
# https://bugzilla.libsdl.org/show_bug.cgi?id=4597
define SDL2_REMOVE_SDL2_CONFIG_CMAKE
rm -rf $(STAGING_DIR)/usr/lib/cmake/SDL2
endef
SDL2_POST_INSTALL_STAGING_HOOKS += SDL2_REMOVE_SDL2_CONFIG_CMAKE

# We must enable static build to get compilation successful.
SDL2_CONF_OPTS += --enable-static

Expand Down

0 comments on commit b27076d

Please sign in to comment.