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

package info (click to toggle)
blockattack 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,588 kB
  • sloc: cpp: 28,362; pascal: 408; sh: 141; xml: 45; makefile: 14
file content (34 lines) | stat: -rw-r--r-- 1,293 bytes parent folder | download
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})