-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Fix includes of thirdparty libs which can be unbundled on Linux #73441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,28 +190,30 @@ def configure(env: "Environment"): | |
# 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"] | ||
or env["builtin_graphite"] | ||
or env["builtin_harfbuzz"] | ||
): | ||
env["builtin_freetype"] = True | ||
env["builtin_libpng"] = True | ||
env["builtin_zlib"] = True | ||
env["builtin_graphite"] = True | ||
env["builtin_harfbuzz"] = True | ||
# as shared libraries leads to weird issues. And graphite and harfbuzz need freetype. | ||
ft_linked_deps = [ | ||
env["builtin_freetype"], | ||
env["builtin_libpng"], | ||
env["builtin_zlib"], | ||
env["builtin_graphite"], | ||
env["builtin_harfbuzz"], | ||
] | ||
if (not all(ft_linked_deps)) and any(ft_linked_deps): # All or nothing. | ||
print( | ||
"These libraries should be either all builtin, or all system provided:\n" | ||
"freetype, libpng, zlib, graphite, harfbuzz.\n" | ||
"Please specify `builtin_<name>=no` for all of them, or none." | ||
) | ||
sys.exit() | ||
|
||
if not env["builtin_freetype"]: | ||
env.ParseConfig("pkg-config freetype2 --cflags --libs") | ||
|
||
if not env["builtin_graphite"]: | ||
env.ParseConfig("pkg-config graphite2 --cflags --libs") | ||
|
||
if not env["builtin_icu"]: | ||
env.ParseConfig("pkg-config icu-uc --cflags --libs") | ||
if not env["builtin_icu4c"]: | ||
env.ParseConfig("pkg-config icu-i18n icu-uc --cflags --libs") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
if not env["builtin_harfbuzz"]: | ||
env.ParseConfig("pkg-config harfbuzz harfbuzz-icu --cflags --libs") | ||
|
@@ -266,6 +268,11 @@ def configure(env: "Environment"): | |
if not env["builtin_pcre2"]: | ||
env.ParseConfig("pkg-config libpcre2-32 --cflags --libs") | ||
|
||
if not env["builtin_recastnavigation"]: | ||
# No pkgconfig file so far, hardcode default paths. | ||
env.Prepend(CPPPATH=["/usr/include/recastnavigation"]) | ||
env.Append(LIBS=["Recast"]) | ||
|
||
if not env["builtin_embree"]: | ||
# No pkgconfig file so far, hardcode expected lib name. | ||
env.Append(LIBS=["embree3"]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
#endif | ||
|
||
#if BASISD_SUPPORT_KTX2_ZSTD | ||
#include "../zstd/zstd.h" | ||
#include <zstd.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll make a patch file for this once I confirm the changes work, and see what upstream thinks about it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's already an upstream PR for it: BinomialLLC/basis_universal#228 |
||
#endif | ||
|
||
// Set to 1 to disable the mipPadding alignment workaround (which only seems to be needed when no key-values are written at all) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit brittle, and I think the list is actually longer but with some of the components optional?
Namely fontconfig and msdfgen.