mirror of
https://github.com/Relintai/pandemonium_engine_minimal.git
synced 2024-11-10 20:12:10 +01:00
Now freetype, libpng and zlib is always built in.
This commit is contained in:
parent
b564b6e261
commit
c4cb4e366b
@ -171,12 +171,9 @@ opts.Add(BoolVariable("editor_docs", "Whether to add docs to an editor build or
|
||||
# Thirdparty libraries
|
||||
opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundles", True))
|
||||
opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True))
|
||||
opts.Add(BoolVariable("builtin_freetype", "Use the built-in FreeType library", True))
|
||||
opts.Add(BoolVariable("builtin_libpng", "Use the built-in libpng library", True))
|
||||
opts.Add(BoolVariable("builtin_mbedtls", "Use the built-in mbedTLS library", True))
|
||||
opts.Add(BoolVariable("builtin_pcre2", "Use the built-in PCRE2 library", True))
|
||||
opts.Add(BoolVariable("builtin_pcre2_with_jit", "Use JIT compiler for the built-in PCRE2 library", True))
|
||||
opts.Add(BoolVariable("builtin_zlib", "Use the built-in zlib library", True))
|
||||
|
||||
# Compilation environment setup
|
||||
opts.Add("CXX", "C++ compiler")
|
||||
|
@ -64,7 +64,6 @@ thirdparty_misc_sources = [thirdparty_misc_dir + file for file in thirdparty_mis
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_misc_sources)
|
||||
|
||||
# Zlib library, can be unbundled
|
||||
if env["builtin_zlib"]:
|
||||
thirdparty_zlib_dir = "thirdparty/zlib/"
|
||||
thirdparty_zlib_sources = [
|
||||
"adler32.c",
|
||||
|
@ -11,7 +11,6 @@ env_freetype = env_modules.Clone()
|
||||
|
||||
thirdparty_obj = []
|
||||
|
||||
if env["builtin_freetype"]:
|
||||
thirdparty_dir = "freetype/"
|
||||
thirdparty_sources = [
|
||||
"src/autofit/autofit.c",
|
||||
@ -92,7 +91,6 @@ if env["builtin_freetype"]:
|
||||
env_freetype.Append(CPPDEFINES=["ZLIB_DEBUG"])
|
||||
|
||||
# Also requires libpng headers
|
||||
if env["builtin_libpng"]:
|
||||
env_freetype.Prepend(CPPPATH=["#modules/png/libpng"])
|
||||
|
||||
sfnt = thirdparty_dir + "src/sfnt/sfnt.c"
|
||||
|
@ -9,7 +9,6 @@ env_png = env_modules.Clone()
|
||||
|
||||
thirdparty_obj = []
|
||||
|
||||
if env["builtin_libpng"]:
|
||||
thirdparty_dir = "libpng/"
|
||||
thirdparty_sources = [
|
||||
"png.c",
|
||||
|
@ -178,25 +178,6 @@ def configure(env):
|
||||
|
||||
## Dependencies
|
||||
|
||||
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
|
||||
|
||||
# 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"] or env["builtin_libpng"] or env["builtin_zlib"]:
|
||||
env["builtin_freetype"] = True
|
||||
env["builtin_libpng"] = True
|
||||
env["builtin_zlib"] = True
|
||||
|
||||
if not env["builtin_freetype"]:
|
||||
env.ParseConfig("pkg-config freetype2 --cflags --libs")
|
||||
|
||||
if not env["builtin_libpng"]:
|
||||
env.ParseConfig("pkg-config libpng16 --cflags --libs")
|
||||
|
||||
if False: # not env['builtin_assimp']:
|
||||
# FIXME: Add min version check
|
||||
env.ParseConfig("pkg-config assimp --cflags --libs")
|
||||
|
||||
if not env["builtin_enet"]:
|
||||
env.ParseConfig("pkg-config libenet --cflags --libs")
|
||||
|
||||
@ -214,10 +195,6 @@ def configure(env):
|
||||
|
||||
## Flags
|
||||
|
||||
# Linkflags below this line should typically stay the last ones
|
||||
if not env["builtin_zlib"]:
|
||||
env.ParseConfig("pkg-config zlib --cflags --libs")
|
||||
|
||||
env.Prepend(CPPPATH=["#platform/server"])
|
||||
env.Append(CPPDEFINES=["SERVER_ENABLED", "UNIX_ENABLED"])
|
||||
|
||||
|
@ -264,23 +264,6 @@ def configure(env):
|
||||
|
||||
# FIXME: Check for existence of the libs before parsing their flags with pkg-config
|
||||
|
||||
# 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"] or env["builtin_libpng"] or env["builtin_zlib"]:
|
||||
env["builtin_freetype"] = True
|
||||
env["builtin_libpng"] = True
|
||||
env["builtin_zlib"] = True
|
||||
|
||||
if not env["builtin_freetype"]:
|
||||
env.ParseConfig("pkg-config freetype2 --cflags --libs")
|
||||
|
||||
if not env["builtin_libpng"]:
|
||||
env.ParseConfig("pkg-config libpng16 --cflags --libs")
|
||||
|
||||
if False: # not env['builtin_assimp']:
|
||||
# FIXME: Add min version check
|
||||
env.ParseConfig("pkg-config assimp --cflags --libs")
|
||||
|
||||
if not env["builtin_enet"]:
|
||||
env.ParseConfig("pkg-config libenet --cflags --libs")
|
||||
|
||||
@ -323,10 +306,6 @@ def configure(env):
|
||||
else:
|
||||
env["udev"] = False # Linux specific
|
||||
|
||||
# Linkflags below this line should typically stay the last ones
|
||||
if not env["builtin_zlib"]:
|
||||
env.ParseConfig("pkg-config zlib --cflags --libs")
|
||||
|
||||
env.Prepend(CPPPATH=["#platform/x11"])
|
||||
env.Append(CPPDEFINES=["X11_ENABLED", "UNIX_ENABLED", "OPENGL_ENABLED", "GLES_ENABLED", ("_FILE_OFFSET_BITS", 64)])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user