File: build-Add-include-directories-for-all-SDL2_foo-modules.patch

package info (click to toggle)
blockattack 2.9.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,700 kB
  • sloc: cpp: 42,378; sh: 143; pascal: 109; xml: 81; makefile: 14
file content (34 lines) | stat: -rw-r--r-- 1,187 bytes parent folder | download | duplicates (2)
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
@@ -71,8 +71,11 @@
 #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})
 
 
 find_package(Intl REQUIRED)