From 5fef84a1358310304cb1114924525ec4df794b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 9 Oct 2016 23:36:17 +0200 Subject: png: Split library to thirdparty dir and allow unbundling Uses the new structure agreed upon in #6157, but the thirdparty/ folder does not behave following a logic similar to that of modules/ yet. The png driver can't be moved to a module as discussed in #6157, as it's required by core together with a few other ImageLoader implementations (see drivers/register_driver_types.cpp:register_core_driver_types()) Dropped the possibility to disable PNG support, it's a core component of Godot. --- platform/x11/detect.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index ba232f6d4e..98774e8555 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -71,10 +71,10 @@ def get_flags(): ('builtin_zlib', 'no'), ('glew', 'yes'), ("openssl", "yes"), - ('freetype','yes'), #use system freetype - + ('freetype','yes'), # use system freetype + ('libpng', 'system'), #("theora","no"), - ] + ] @@ -143,6 +143,8 @@ def configure(env): if (env["openssl"]=="yes"): env.ParseConfig('pkg-config openssl --cflags --libs') + if (env["libpng"] == "system"): + env.ParseConfig('pkg-config libpng --cflags --libs') if (env["freetype"]=="yes"): env.ParseConfig('pkg-config freetype2 --cflags --libs') -- cgit v1.2.3 From c31ad71f10f68705a456b4257c084d4008c34370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 10 Oct 2016 19:50:51 +0200 Subject: enet: Split enet thirdparty files and allow unbundling Building against shared libraries only implemented for Linux X11 so far. TODO: Document Godot's modifications of upstream enet. --- platform/x11/detect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 98774e8555..10e44976ca 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -149,7 +149,8 @@ def configure(env): if (env["freetype"]=="yes"): env.ParseConfig('pkg-config freetype2 --cflags --libs') - + if (env["enet"] == "system"): + env.ParseConfig('pkg-config libenet --cflags --libs') env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) -- cgit v1.2.3 From ee3cf211c6fd4d1e30617467cdbbe945798a68b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 11 Oct 2016 23:35:58 +0200 Subject: webp: Make it a module and unbundle libwebp thirdparty files Note that there are two Godot-specific changes made to libwebp for the javascript/HTML5 platform. They are documented in the README.md. --- platform/x11/detect.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 10e44976ca..6a5ca84cbe 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -146,6 +146,9 @@ def configure(env): if (env["libpng"] == "system"): env.ParseConfig('pkg-config libpng --cflags --libs') + if (env["libwebp"] == "system"): + env.ParseConfig('pkg-config libwebp --cflags --libs') + if (env["freetype"]=="yes"): env.ParseConfig('pkg-config freetype2 --cflags --libs') -- cgit v1.2.3 From d9a291f6411f2e571c181da0ac89f550ba73f681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Oct 2016 20:37:38 +0200 Subject: ogg/vorbis/opus: Make them modules and unbundle thirdparty libs Took the opportunity to undo the Godot changed made to the opus source. The opus module should eventually be built in its own environment to avoid polluting others with too many include dirs and defines. TODO: Fix the platform/ stuff for opus. --- platform/x11/detect.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 6a5ca84cbe..8a156a6bce 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -155,6 +155,17 @@ def configure(env): if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') + if (env["libogg"] == "system"): + env.ParseConfig('pkg-config ogg --cflags --libs') + + if (env["libvorbis"] == "system"): + env["libogg"] = "system" # Needed to link against system libvorbis + env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs') + + if (env["opus"] == "system"): + env["libogg"] = "system" # Needed to link against system opus + env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs') + env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) -- cgit v1.2.3 From 422196759f93df249db38619f136cabd5dcf42cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Oct 2016 23:06:17 +0200 Subject: openssl: Move to a module and split thirdparty lib Same rationale as the previous commits. --- platform/x11/detect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 8a156a6bce..98c2d1e8fd 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -70,7 +70,7 @@ def get_flags(): return [ ('builtin_zlib', 'no'), ('glew', 'yes'), - ("openssl", "yes"), + ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), #("theora","no"), @@ -140,7 +140,7 @@ def configure(env): env.ParseConfig('pkg-config xcursor --cflags --libs') env.ParseConfig('pkg-config xrandr --cflags --libs') - if (env["openssl"]=="yes"): + if (env["openssl"] == "system"): env.ParseConfig('pkg-config openssl --cflags --libs') if (env["libpng"] == "system"): -- cgit v1.2.3 From cfcc8a20e862b758c32bd3f152186e6df0591a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 19:40:40 +0200 Subject: theora: Move to a module and split thirdparty lib Same rationale as the previous commits. --- platform/x11/detect.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 98c2d1e8fd..7c22bd97ff 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -73,7 +73,6 @@ def get_flags(): ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), - #("theora","no"), ] @@ -155,16 +154,24 @@ def configure(env): if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') - if (env["libogg"] == "system"): - env.ParseConfig('pkg-config ogg --cflags --libs') + # Sound and video libraries + # Keep the order as it triggers chained dependencies (ogg needed by others, etc.) + + if (env["libtheora"] == "system"): + env["libogg"] = "system" # Needed to link against system libtheora + env["libvorbis"] = "system" # Needed to link against system libtheora + env.ParseConfig('pkg-config theora theoradec --cflags --libs') if (env["libvorbis"] == "system"): env["libogg"] = "system" # Needed to link against system libvorbis - env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs') + env.ParseConfig('pkg-config vorbis vorbisfile --cflags --libs') if (env["opus"] == "system"): env["libogg"] = "system" # Needed to link against system opus - env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs') + env.ParseConfig('pkg-config opus opusfile --cflags --libs') + + if (env["libogg"] == "system"): + env.ParseConfig('pkg-config ogg --cflags --libs') env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) -- cgit v1.2.3 From 8311a78df5cdf257297c1ec7493cb098dc76f010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 21:48:06 +0200 Subject: squish: Move to a module and split thirdparty lib --- platform/x11/detect.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 7c22bd97ff..90122eef4a 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -154,6 +154,9 @@ def configure(env): if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') + if (env["squish"] == "system" and env["tools"] == "yes"): + env.ParseConfig('pkg-config libsquish --cflags --libs') + # Sound and video libraries # Keep the order as it triggers chained dependencies (ogg needed by others, etc.) -- cgit v1.2.3 From 36738ddda4f732fff7bbfb7b4605a47a0bd7c045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 08:27:59 +0200 Subject: glew: Split thirdparty files and isolate env Not fully happy about the way this one interacts with the various platforms. Maybe the platform_config.h should be generated by the SCsub instead of passing a define just to know where is the header. --- platform/x11/detect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 90122eef4a..3ebefb640c 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -69,7 +69,6 @@ def get_flags(): return [ ('builtin_zlib', 'no'), - ('glew', 'yes'), ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), @@ -179,6 +178,9 @@ def configure(env): env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) + if (env["glew"] == "system"): + env.ParseConfig('pkg-config glew --cflags --libs') + if os.system("pkg-config --exists alsa")==0: print("Enabling ALSA") env.Append(CPPFLAGS=["-DALSA_ENABLED"]) -- cgit v1.2.3 From cbf52606f4928df46fc89d37d781bad782f0616e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 18:58:24 +0200 Subject: zlib: Split thirdparty files, simplify scons option --- platform/x11/detect.py | 1 - 1 file changed, 1 deletion(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 3ebefb640c..0c14c29361 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -68,7 +68,6 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), -- cgit v1.2.3 From edbc0c0d0bed169b3c07ef0f504b97936f0dab37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 21:57:43 +0200 Subject: freetype: Make it a module and split thirdparty library Comment out the weird workaround for building on Windows at it might not be needed anymore. Testing needed to confirm. --- platform/x11/detect.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 0c14c29361..92bc58d7b0 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -69,7 +69,7 @@ def get_flags(): return [ ("openssl", "system"), - ('freetype','yes'), # use system freetype + ('freetype', 'system'), ('libpng', 'system'), ] @@ -140,15 +140,16 @@ def configure(env): if (env["openssl"] == "system"): env.ParseConfig('pkg-config openssl --cflags --libs') - if (env["libpng"] == "system"): - env.ParseConfig('pkg-config libpng --cflags --libs') - if (env["libwebp"] == "system"): env.ParseConfig('pkg-config libwebp --cflags --libs') - if (env["freetype"]=="yes"): + if (env["freetype"] == "system"): + env["libpng"] = "system" # Freetype links against libpng env.ParseConfig('pkg-config freetype2 --cflags --libs') + if (env["libpng"] == "system"): + env.ParseConfig('pkg-config libpng --cflags --libs') + if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') -- cgit v1.2.3