mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Merge pull request #99171 from dustdfg/pkg_config
Buildsystem: Use pkg-config for miniupnpc and mbedtls
This commit is contained in:
commit
896d3bd0d1
@ -279,16 +279,18 @@ def configure(env: "SConsEnvironment"):
|
||||
env.ParseConfig("pkg-config libwebp --cflags --libs")
|
||||
|
||||
if not env["builtin_mbedtls"]:
|
||||
# mbedTLS does not provide a pkgconfig config yet. See https://github.com/ARMmbed/mbedtls/issues/228
|
||||
# mbedTLS only provides a pkgconfig file since 3.6.0, but we still support 2.28.x,
|
||||
# so fallback to manually specifying LIBS if it fails.
|
||||
if os.system("pkg-config --exists mbedtls") == 0: # 0 means found
|
||||
env.ParseConfig("pkg-config mbedtls mbedcrypto mbedx509 --cflags --libs")
|
||||
else:
|
||||
env.Append(LIBS=["mbedtls", "mbedcrypto", "mbedx509"])
|
||||
|
||||
if not env["builtin_wslay"]:
|
||||
env.ParseConfig("pkg-config libwslay --cflags --libs")
|
||||
|
||||
if not env["builtin_miniupnpc"]:
|
||||
# No pkgconfig file so far, hardcode default paths.
|
||||
env.Prepend(CPPPATH=["/usr/include/miniupnpc"])
|
||||
env.Append(LIBS=["miniupnpc"])
|
||||
env.ParseConfig("pkg-config miniupnpc --cflags --libs")
|
||||
|
||||
# On Linux wchar_t should be 32-bits
|
||||
# 16-bit library shouldn't be required due to compiler optimizations
|
||||
|
Loading…
Reference in New Issue
Block a user