SCsub 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. Import("env")
  3. Import("env_modules")
  4. freetype_enabled = "freetype" in env.module_list
  5. msdfgen_enabled = "msdfgen" in env.module_list
  6. env_text_server_fb = env_modules.Clone()
  7. if "svg" in env.module_list:
  8. env_text_server_fb.Prepend(
  9. CPPPATH=["#thirdparty/thorvg/inc", "#thirdparty/thorvg/src/common", "#thirdparty/thorvg/src/renderer"]
  10. )
  11. # Enable ThorVG static object linking.
  12. env_text_server_fb.Append(CPPDEFINES=["TVG_STATIC"])
  13. if env["builtin_msdfgen"] and msdfgen_enabled:
  14. # Treat msdfgen headers as system headers to avoid raising warnings. Not supported on MSVC.
  15. if not env.msvc:
  16. env_text_server_fb.Append(CPPFLAGS=["-isystem", Dir("#thirdparty/msdfgen").path])
  17. else:
  18. env_text_server_fb.Prepend(CPPPATH=["#thirdparty/msdfgen"])
  19. if env["builtin_freetype"] and freetype_enabled:
  20. env_text_server_fb.Append(CPPDEFINES=["FT_CONFIG_OPTION_USE_BROTLI"])
  21. env_text_server_fb.Prepend(CPPPATH=["#thirdparty/freetype/include"])
  22. env_text_server_fb.add_source_files(env.modules_sources, "*.cpp")