shaderc.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. project "shaderc"
  2. uuid "f3cd2e90-52a4-11e1-b86c-0800200c9a66"
  3. kind "ConsoleApp"
  4. local GLSL_OPTIMIZER = (BGFX_DIR .. "3rdparty/glsl-optimizer/")
  5. local FCPP_DIR = (BGFX_DIR .. "3rdparty/fcpp/")
  6. configuration { "vs*" }
  7. includedirs {
  8. GLSL_OPTIMIZER .. "src/glsl/msvc",
  9. }
  10. defines { -- glsl-optimizer
  11. "__STDC__",
  12. "__STDC_VERSION__=199901L",
  13. "strdup=_strdup",
  14. "alloca=_alloca",
  15. "isascii=__isascii",
  16. }
  17. buildoptions {
  18. "/wd4996" -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
  19. }
  20. configuration { "windows", "vs*" }
  21. includedirs {
  22. GLSL_OPTIMIZER .. "include/c99",
  23. }
  24. configuration { "windows" }
  25. includedirs {
  26. "$(DXSDK_DIR)/include",
  27. }
  28. links {
  29. "d3dx9",
  30. "d3dcompiler",
  31. "dxguid",
  32. }
  33. configuration {}
  34. defines { -- fcpp
  35. "NINCLUDE=64",
  36. "NWORK=65536",
  37. "NBUFF=65536",
  38. }
  39. includedirs {
  40. BX_DIR .. "include",
  41. FCPP_DIR,
  42. GLSL_OPTIMIZER .. "include",
  43. GLSL_OPTIMIZER .. "src/mesa",
  44. GLSL_OPTIMIZER .. "src/mapi",
  45. GLSL_OPTIMIZER .. "src/glsl",
  46. }
  47. files {
  48. BGFX_DIR .. "tools/shaderc/**.cpp",
  49. BGFX_DIR .. "tools/shaderc/**.h",
  50. FCPP_DIR .. "**.h",
  51. FCPP_DIR .. "cpp1.c",
  52. FCPP_DIR .. "cpp2.c",
  53. FCPP_DIR .. "cpp3.c",
  54. FCPP_DIR .. "cpp4.c",
  55. FCPP_DIR .. "cpp5.c",
  56. FCPP_DIR .. "cpp6.c",
  57. FCPP_DIR .. "cpp6.c",
  58. GLSL_OPTIMIZER .. "src/mesa/**.c",
  59. GLSL_OPTIMIZER .. "src/glsl/**.cpp",
  60. GLSL_OPTIMIZER .. "src/mesa/**.h",
  61. GLSL_OPTIMIZER .. "src/glsl/**.c",
  62. GLSL_OPTIMIZER .. "src/glsl/**.cpp",
  63. GLSL_OPTIMIZER .. "src/glsl/**.h",
  64. }
  65. excludes {
  66. GLSL_OPTIMIZER .. "src/glsl/glcpp/glcpp.c",
  67. GLSL_OPTIMIZER .. "src/glsl/glcpp/tests/**",
  68. GLSL_OPTIMIZER .. "src/glsl/glcpp/**.l",
  69. GLSL_OPTIMIZER .. "src/glsl/glcpp/**.y",
  70. GLSL_OPTIMIZER .. "src/glsl/ir_set_program_inouts.cpp",
  71. GLSL_OPTIMIZER .. "src/glsl/main.cpp",
  72. GLSL_OPTIMIZER .. "src/glsl/builtin_stubs.cpp",
  73. }