Package: caveexpress / 2.4+git20160609-3

use-system-libraries.patch Patch series | 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
From: Markus Koschany <apo@debian.org>
Date: Thu, 9 Jun 2016 10:31:31 +0200
Subject: use system libraries

The build system should detect system libraries automatically and use them.
---
 CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0366b6d..6a15d1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,13 @@
 cmake_minimum_required(VERSION 2.8.7)
 project(caveproductions)
+INCLUDE(FindPkgConfig)
+
+PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
+PKG_SEARCH_MODULE(SDL2IMAGE REQUIRED SDL2_image>=2.0.0)
+PKG_SEARCH_MODULE(LUA5.2 REQUIRED lua5.2)
+PKG_SEARCH_MODULE(Box2D REQUIRED box2d)
+
+INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIRS})
 
 #-------------------------------------------------------------------------------
 # options