shaderc.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 { "mingw or linux or osx" }
  21. buildoptions {
  22. "-fno-strict-aliasing" -- glsl-optimizer has bugs if strict aliasing is used.
  23. }
  24. configuration { "windows", "vs*" }
  25. includedirs {
  26. GLSL_OPTIMIZER .. "include/c99",
  27. }
  28. configuration { "windows" }
  29. includedirs {
  30. "$(DXSDK_DIR)/include",
  31. }
  32. links {
  33. "d3dx9",
  34. "d3dcompiler",
  35. "dxguid",
  36. }
  37. configuration {}
  38. defines { -- fcpp
  39. "NINCLUDE=64",
  40. "NWORK=65536",
  41. "NBUFF=65536",
  42. }
  43. includedirs {
  44. BX_DIR .. "include",
  45. FCPP_DIR,
  46. GLSL_OPTIMIZER .. "include",
  47. GLSL_OPTIMIZER .. "src/mesa",
  48. GLSL_OPTIMIZER .. "src/mapi",
  49. GLSL_OPTIMIZER .. "src/glsl",
  50. }
  51. files {
  52. BGFX_DIR .. "tools/shaderc/**.cpp",
  53. BGFX_DIR .. "tools/shaderc/**.h",
  54. FCPP_DIR .. "**.h",
  55. FCPP_DIR .. "cpp1.c",
  56. FCPP_DIR .. "cpp2.c",
  57. FCPP_DIR .. "cpp3.c",
  58. FCPP_DIR .. "cpp4.c",
  59. FCPP_DIR .. "cpp5.c",
  60. FCPP_DIR .. "cpp6.c",
  61. FCPP_DIR .. "cpp6.c",
  62. GLSL_OPTIMIZER .. "src/mesa/**.c",
  63. GLSL_OPTIMIZER .. "src/glsl/**.cpp",
  64. GLSL_OPTIMIZER .. "src/mesa/**.h",
  65. GLSL_OPTIMIZER .. "src/glsl/**.c",
  66. GLSL_OPTIMIZER .. "src/glsl/**.cpp",
  67. GLSL_OPTIMIZER .. "src/glsl/**.h",
  68. }
  69. excludes {
  70. GLSL_OPTIMIZER .. "src/glsl/glcpp/glcpp.c",
  71. GLSL_OPTIMIZER .. "src/glsl/glcpp/tests/**",
  72. GLSL_OPTIMIZER .. "src/glsl/glcpp/**.l",
  73. GLSL_OPTIMIZER .. "src/glsl/glcpp/**.y",
  74. GLSL_OPTIMIZER .. "src/glsl/ir_set_program_inouts.cpp",
  75. GLSL_OPTIMIZER .. "src/glsl/main.cpp",
  76. GLSL_OPTIMIZER .. "src/glsl/builtin_stubs.cpp",
  77. }