SCsub 1.2 KB

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