2017-08-19 04:21:24 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2020-03-30 08:28:32 +02:00
|
|
|
Import("env")
|
|
|
|
Import("env_modules")
|
2018-10-01 10:59:03 +02:00
|
|
|
|
|
|
|
env_svg = env_modules.Clone()
|
2017-08-19 04:21:24 +02:00
|
|
|
|
|
|
|
# Thirdparty source files
|
2020-12-17 16:01:36 +01:00
|
|
|
|
|
|
|
thirdparty_obj = []
|
|
|
|
|
2022-01-13 13:54:19 +01:00
|
|
|
thirdparty_dir = "#thirdparty/thorvg/"
|
2017-08-19 04:21:24 +02:00
|
|
|
thirdparty_sources = [
|
2023-09-29 14:58:36 +02:00
|
|
|
# common
|
|
|
|
"src/common/tvgCompressor.cpp",
|
2024-05-10 09:30:57 +02:00
|
|
|
"src/common/tvgLines.cpp",
|
2023-09-29 14:58:36 +02:00
|
|
|
"src/common/tvgMath.cpp",
|
|
|
|
"src/common/tvgStr.cpp",
|
|
|
|
# SVG parser
|
2022-03-08 13:56:23 +01:00
|
|
|
"src/loaders/svg/tvgSvgCssStyle.cpp",
|
2022-10-13 17:03:36 +02:00
|
|
|
"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",
|
2023-09-29 14:58:36 +02:00
|
|
|
"src/loaders/raw/tvgRawLoader.cpp",
|
2024-05-10 09:30:57 +02:00
|
|
|
# image loaders
|
2023-10-13 13:09:33 +02:00
|
|
|
"src/loaders/external_png/tvgPngLoader.cpp",
|
2024-05-10 09:30:57 +02:00
|
|
|
"src/loaders/external_webp/tvgWebpLoader.cpp",
|
2023-10-13 13:09:33 +02:00
|
|
|
"src/loaders/jpg/tvgJpgd.cpp",
|
|
|
|
"src/loaders/jpg/tvgJpgLoader.cpp",
|
2023-09-29 14:58:36 +02:00
|
|
|
# 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",
|
2024-01-05 18:01:00 +01:00
|
|
|
"src/renderer/tvgText.cpp",
|
|
|
|
# "src/renderer/tvgWgCanvas.cpp",
|
2023-09-29 14:58:36 +02:00
|
|
|
# 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",
|
2017-08-19 04:21:24 +02:00
|
|
|
]
|
2022-01-13 13:54:19 +01:00
|
|
|
|
2017-08-19 04:21:24 +02:00
|
|
|
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
|
|
|
|
|
2022-01-13 13:54:19 +01:00
|
|
|
env_svg.Prepend(CPPPATH=[thirdparty_dir + "inc"])
|
2017-08-19 04:21:24 +02:00
|
|
|
|
2023-08-08 22:22:11 +02:00
|
|
|
# Enable ThorVG static object linking.
|
|
|
|
env_svg.Append(CPPDEFINES=["TVG_STATIC"])
|
|
|
|
|
2018-10-01 10:59:03 +02:00
|
|
|
env_thirdparty = env_svg.Clone()
|
2018-09-28 13:29:52 +02:00
|
|
|
env_thirdparty.disable_warnings()
|
2022-01-13 13:54:19 +01:00
|
|
|
env_thirdparty.Prepend(
|
|
|
|
CPPPATH=[
|
2023-09-29 14:58:36 +02:00
|
|
|
thirdparty_dir + "src/common",
|
2022-01-13 13:54:19 +01:00
|
|
|
thirdparty_dir + "src/loaders/svg",
|
2023-09-29 14:58:36 +02:00
|
|
|
thirdparty_dir + "src/renderer",
|
|
|
|
thirdparty_dir + "src/renderer/sw_engine",
|
|
|
|
thirdparty_dir + "src/loaders/raw",
|
2023-10-13 13:09:33 +02:00
|
|
|
thirdparty_dir + "src/loaders/external_png",
|
2024-05-10 09:30:57 +02:00
|
|
|
thirdparty_dir + "src/loaders/external_webp",
|
2023-10-13 13:09:33 +02:00
|
|
|
thirdparty_dir + "src/loaders/jpg",
|
2024-05-10 09:30:57 +02:00
|
|
|
"#thirdparty/libpng",
|
|
|
|
"#thirdparty/libwebp/src",
|
2022-01-13 13:54:19 +01:00
|
|
|
]
|
|
|
|
)
|
2022-10-13 17:03:36 +02:00
|
|
|
|
2020-12-17 16:01:36 +01:00
|
|
|
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
|
2018-09-28 13:29:52 +02:00
|
|
|
|
2020-12-17 16:01:36 +01:00
|
|
|
# Needed to force rebuilding the module files when the thirdparty library is updated.
|
|
|
|
env.Depends(module_obj, thirdparty_obj)
|