mirror of
https://github.com/godotengine/godot
synced 2024-11-05 16:53:09 +00:00
e090b112ef
https://github.com/thorvg/thorvg/releases/tag/v0.12.0 Godot-related SVG bug fixes: + [SwEngine] Fixed a linear filling scaling issue. thorvg/thorvg#1834 + [SwEngine] Path data not invalid even though it doesn't start with MoveTo. thorvg/thorvg#1848 Fixes #86128 Gradient issue.
92 lines
2.8 KiB
Python
92 lines
2.8 KiB
Python
#!/usr/bin/env python
|
|
|
|
Import("env")
|
|
Import("env_modules")
|
|
|
|
env_svg = env_modules.Clone()
|
|
|
|
# Thirdparty source files
|
|
|
|
thirdparty_obj = []
|
|
|
|
thirdparty_dir = "#thirdparty/thorvg/"
|
|
thirdparty_sources = [
|
|
# common
|
|
"src/common/tvgBezier.cpp",
|
|
"src/common/tvgCompressor.cpp",
|
|
"src/common/tvgMath.cpp",
|
|
"src/common/tvgStr.cpp",
|
|
# SVG parser
|
|
"src/loaders/svg/tvgSvgCssStyle.cpp",
|
|
"src/loaders/svg/tvgSvgLoader.cpp",
|
|
"src/loaders/svg/tvgSvgPath.cpp",
|
|
"src/loaders/svg/tvgSvgSceneBuilder.cpp",
|
|
"src/loaders/svg/tvgSvgUtil.cpp",
|
|
"src/loaders/svg/tvgXmlParser.cpp",
|
|
"src/loaders/raw/tvgRawLoader.cpp",
|
|
"src/loaders/external_png/tvgPngLoader.cpp",
|
|
"src/loaders/jpg/tvgJpgd.cpp",
|
|
"src/loaders/jpg/tvgJpgLoader.cpp",
|
|
# renderer common
|
|
"src/renderer/tvgAccessor.cpp",
|
|
# "src/renderer/tvgAnimation.cpp",
|
|
"src/renderer/tvgCanvas.cpp",
|
|
"src/renderer/tvgFill.cpp",
|
|
# "src/renderer/tvgGlCanvas.cpp",
|
|
"src/renderer/tvgInitializer.cpp",
|
|
"src/renderer/tvgLoader.cpp",
|
|
"src/renderer/tvgPaint.cpp",
|
|
"src/renderer/tvgPicture.cpp",
|
|
"src/renderer/tvgRender.cpp",
|
|
# "src/renderer/tvgSaver.cpp",
|
|
"src/renderer/tvgScene.cpp",
|
|
"src/renderer/tvgShape.cpp",
|
|
"src/renderer/tvgSwCanvas.cpp",
|
|
"src/renderer/tvgTaskScheduler.cpp",
|
|
"src/renderer/tvgText.cpp",
|
|
# "src/renderer/tvgWgCanvas.cpp",
|
|
# renderer sw_engine
|
|
"src/renderer/sw_engine/tvgSwFill.cpp",
|
|
"src/renderer/sw_engine/tvgSwImage.cpp",
|
|
"src/renderer/sw_engine/tvgSwMath.cpp",
|
|
"src/renderer/sw_engine/tvgSwMemPool.cpp",
|
|
"src/renderer/sw_engine/tvgSwRaster.cpp",
|
|
"src/renderer/sw_engine/tvgSwRenderer.cpp",
|
|
"src/renderer/sw_engine/tvgSwRle.cpp",
|
|
"src/renderer/sw_engine/tvgSwShape.cpp",
|
|
"src/renderer/sw_engine/tvgSwStroke.cpp",
|
|
]
|
|
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
env_svg.Prepend(CPPPATH=[thirdparty_dir + "inc"])
|
|
|
|
# Enable ThorVG static object linking.
|
|
env_svg.Append(CPPDEFINES=["TVG_STATIC"])
|
|
|
|
env_thirdparty = env_svg.Clone()
|
|
env_thirdparty.disable_warnings()
|
|
env_thirdparty.Prepend(
|
|
CPPPATH=[
|
|
thirdparty_dir + "src/common",
|
|
thirdparty_dir + "src/loaders/svg",
|
|
thirdparty_dir + "src/renderer",
|
|
thirdparty_dir + "src/renderer/sw_engine",
|
|
thirdparty_dir + "src/loaders/raw",
|
|
thirdparty_dir + "src/loaders/external_png",
|
|
thirdparty_dir + "src/loaders/jpg",
|
|
]
|
|
)
|
|
|
|
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
|
|
env.modules_sources += thirdparty_obj
|
|
|
|
# Godot source files
|
|
|
|
module_obj = []
|
|
|
|
env_svg.add_source_files(module_obj, "*.cpp")
|
|
env.modules_sources += module_obj
|
|
|
|
# Needed to force rebuilding the module files when the thirdparty library is updated.
|
|
env.Depends(module_obj, thirdparty_obj)
|