summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-01-08 17:13:30 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-01-08 17:17:05 +0100
commitd945c4e58ea1b49db3e0e96be46751b2d7fa808a (patch)
treedbb84636be6de5fe8cbd0040dc8f3ecac16cea66 /platform/x11
parentede36aca8d65e39b78520d45d3b3c29a99d4e17e (diff)
x11: Improve logic for cross-dependencies between freetype, zlib and libpng
Fixes #7373.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/detect.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 0169abf7fd..b5f6359d21 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -139,6 +139,13 @@ def configure(env):
if (env['builtin_libwebp'] == 'no'):
env.ParseConfig('pkg-config libwebp --cflags --libs')
+ # freetype depends on libpng and zlib, so bundling one of them while keeping others
+ # as shared libraries leads to weird issues
+ if (env['builtin_freetype'] == 'yes' or env['builtin_libpng'] == 'yes' or env['builtin_zlib'] == 'yes'):
+ env['builtin_freetype'] = 'yes'
+ env['builtin_libpng'] = 'yes'
+ env['builtin_zlib'] = 'yes'
+
if (env['builtin_freetype'] == 'no'):
env.ParseConfig('pkg-config freetype2 --cflags --libs')
@@ -203,10 +210,14 @@ def configure(env):
else:
print("PulseAudio development libraries not found, disabling driver")
+ if (env['builtin_zlib'] == 'no'):
+ env.ParseConfig('pkg-config zlib --cflags --libs')
+
env.Append(CPPFLAGS=['-DX11_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
- env.Append(LIBS=['GL', 'pthread', 'z'])
+ env.Append(LIBS=['GL', 'pthread'])
+
if (platform.system() == "Linux"):
- env.Append(LIBS='dl')
+ env.Append(LIBS=['dl'])
# env.Append(CPPFLAGS=['-DMPC_FIXED_POINT'])
# host compiler is default..