Skip to content

Commit

Permalink
SCons: Fix ThorVG build option in TextServers with #80095
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Aug 17, 2023
1 parent 446dfdb commit 5282974
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
2 changes: 2 additions & 0 deletions modules/text_server_adv/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ msdfgen_enabled = "msdfgen" in env.module_list

if "svg" in env.module_list:
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/thorvg/inc", "#thirdparty/thorvg/src/lib"])
# Enable ThorVG static object linking.
env_text_server_adv.Append(CPPDEFINES=["TVG_STATIC"])

if env["builtin_harfbuzz"]:
env_harfbuzz = env_modules.Clone()
Expand Down
14 changes: 4 additions & 10 deletions modules/text_server_adv/gdextension_build/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,13 @@ if env["thorvg_enabled"] and env["freetype_enabled"]:
"src/lib/tvgShape.cpp",
"src/lib/tvgSwCanvas.cpp",
"src/lib/tvgTaskScheduler.cpp",
"src/loaders/external_png/tvgPngLoader.cpp",
"src/loaders/jpg/tvgJpgd.cpp",
"src/loaders/jpg/tvgJpgLoader.cpp",
"src/loaders/raw/tvgRawLoader.cpp",
"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/tvg/tvgTvgBinInterpreter.cpp",
"src/loaders/tvg/tvgTvgLoader.cpp",
"src/savers/tvg/tvgTvgSaver.cpp",
]
thirdparty_tvg_sources = [thirdparty_tvg_dir + file for file in thirdparty_tvg_sources]

Expand All @@ -90,15 +84,15 @@ if env["thorvg_enabled"] and env["freetype_enabled"]:
"../../../thirdparty/thorvg/inc",
"../../../thirdparty/thorvg/src/lib",
"../../../thirdparty/thorvg/src/lib/sw_engine",
"../../../thirdparty/thorvg/src/loaders/external_png",
"../../../thirdparty/thorvg/src/loaders/jpg",
"../../../thirdparty/thorvg/src/loaders/raw",
"../../../thirdparty/thorvg/src/loaders/svg",
"../../../thirdparty/thorvg/src/loaders/tvg",
"../../../thirdparty/thorvg/src/savers/tvg",
"../../../thirdparty/libpng",
]
)

# Enable ThorVG static object linking.
env_tvg.Append(CPPDEFINES=["TVG_STATIC"])

env.Append(CPPPATH=["../../../thirdparty/thorvg/inc", "../../../thirdparty/thorvg/src/lib"])
env.Append(CPPDEFINES=["MODULE_SVG_ENABLED"])

Expand Down
2 changes: 2 additions & 0 deletions modules/text_server_fb/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ env_text_server_fb = env_modules.Clone()

if "svg" in env.module_list:
env_text_server_fb.Prepend(CPPPATH=["#thirdparty/thorvg/inc", "#thirdparty/thorvg/src/lib"])
# Enable ThorVG static object linking.
env_text_server_fb.Append(CPPDEFINES=["TVG_STATIC"])

if env["builtin_msdfgen"] and msdfgen_enabled:
# Treat msdfgen headers as system headers to avoid raising warnings. Not supported on MSVC.
Expand Down
14 changes: 4 additions & 10 deletions modules/text_server_fb/gdextension_build/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,13 @@ if env["thorvg_enabled"] and env["freetype_enabled"]:
"src/lib/tvgShape.cpp",
"src/lib/tvgSwCanvas.cpp",
"src/lib/tvgTaskScheduler.cpp",
"src/loaders/external_png/tvgPngLoader.cpp",
"src/loaders/jpg/tvgJpgd.cpp",
"src/loaders/jpg/tvgJpgLoader.cpp",
"src/loaders/raw/tvgRawLoader.cpp",
"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/tvg/tvgTvgBinInterpreter.cpp",
"src/loaders/tvg/tvgTvgLoader.cpp",
"src/savers/tvg/tvgTvgSaver.cpp",
]
thirdparty_tvg_sources = [thirdparty_tvg_dir + file for file in thirdparty_tvg_sources]

Expand All @@ -85,15 +79,15 @@ if env["thorvg_enabled"] and env["freetype_enabled"]:
"../../../thirdparty/thorvg/inc",
"../../../thirdparty/thorvg/src/lib",
"../../../thirdparty/thorvg/src/lib/sw_engine",
"../../../thirdparty/thorvg/src/loaders/external_png",
"../../../thirdparty/thorvg/src/loaders/jpg",
"../../../thirdparty/thorvg/src/loaders/raw",
"../../../thirdparty/thorvg/src/loaders/svg",
"../../../thirdparty/thorvg/src/loaders/tvg",
"../../../thirdparty/thorvg/src/savers/tvg",
"../../../thirdparty/libpng",
]
)

# Enable ThorVG static object linking.
env_tvg.Append(CPPDEFINES=["TVG_STATIC"])

env.Append(CPPPATH=["../../../thirdparty/thorvg/inc", "../../../thirdparty/thorvg/src/lib"])
env.Append(CPPDEFINES=["MODULE_SVG_ENABLED"])

Expand Down

0 comments on commit 5282974

Please sign in to comment.