1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From: Simon McVittie <smcv@debian.org>
Date: Wed, 30 Sep 2020 16:37:52 +0200
Subject: build-Add-include-directories-for-all-SDL2_foo-modules
The build system assumed that SDL2 and all the SDL2_foo libraries were
installed with the same ${includedir}, but this is not guaranteed:
we could be using a system copy of SDL2 in conjunction with SDL2_foo
libraries in a non-standard prefix.
This also fixes a build regression with recent Debian SDL2 packages, in
which the SDL2 headers are installed in an architecture-dependent
directory but the SDL2_foo headers are not.
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: no
Bug-Debian: https://bugs.debian.org/951943
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,8 +67,11 @@ include_directories(${SDL2_INCLUDE_DIRS}
#Setup things that use pkg-config
find_package(PkgConfig REQUIRED)
pkg_search_module(SDL2MIXER REQUIRED SDL2_mixer)
+include_directories(${SDL2MIXER_INCLUDE_DIRS})
pkg_search_module(SDL2IMAGE REQUIRED SDL2_image)
+include_directories(${SDL2IMAGE_INCLUDE_DIRS})
pkg_search_module(SDL2TTF REQUIRED SDL2_ttf)
+include_directories(${SDL2TTF_INCLUDE_DIRS})
include_directories(${SDL2MIXER_INCLUDE_DIRS})
include_directories(${SDL2IMAGE_INCLUDE_DIRS})
|