1
0

ext-opus.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. project "opus"
  2. uuid "9a2d9099-e1a2-4287-b845-e3598ad24d70"
  3. language "C"
  4. location ( "../../build/" .. mpt_projectpathname .. "/ext" )
  5. mpt_projectname = "opus"
  6. dofile "../../build/premake/premake-defaults-LIBorDLL.lua"
  7. dofile "../../build/premake/premake-defaults.lua"
  8. targetname "openmpt-opus"
  9. local extincludedirs = {
  10. "../../include/ogg/include",
  11. }
  12. filter { "action:vs*" }
  13. includedirs ( extincludedirs )
  14. filter { "not action:vs*" }
  15. sysincludedirs ( extincludedirs )
  16. filter {}
  17. includedirs {
  18. "../../include/opus/include",
  19. "../../include/opus/celt",
  20. "../../include/opus/silk",
  21. "../../include/opus/silk/float",
  22. "../../include/opus/src",
  23. "../../include/opus/win32",
  24. "../../include/opus",
  25. }
  26. filter {}
  27. filter { "action:vs*" }
  28. characterset "Unicode"
  29. filter {}
  30. files {
  31. "../../include/opus/include/opus.h",
  32. "../../include/opus/include/opus_custom.h",
  33. "../../include/opus/include/opus_defines.h",
  34. "../../include/opus/include/opus_multistream.h",
  35. "../../include/opus/include/opus_projection.h",
  36. "../../include/opus/include/opus_types.h",
  37. }
  38. files {
  39. "../../include/opus/celt/*.c",
  40. "../../include/opus/celt/*.h",
  41. "../../include/opus/silk/*.c",
  42. "../../include/opus/silk/*.h",
  43. "../../include/opus/silk/float/*.c",
  44. "../../include/opus/silk/float/*.h",
  45. "../../include/opus/src/*.c",
  46. "../../include/opus/src/*.h",
  47. }
  48. filter { "architecture:x86 or x86_64" }
  49. files {
  50. "../../include/opus/celt/x86/*.c",
  51. "../../include/opus/celt/x86/*.h",
  52. "../../include/opus/silk/x86/*.c",
  53. "../../include/opus/silk/x86/*.h",
  54. }
  55. filter {}
  56. excludes {
  57. "../../include/opus/celt/opus_custom_demo.c",
  58. "../../include/opus/src/opus_compare.c",
  59. "../../include/opus/src/opus_demo.c",
  60. "../../include/opus/src/repacketizer_demo.c",
  61. }
  62. defines { "HAVE_CONFIG_H" }
  63. links { }
  64. filter { "action:vs*" }
  65. buildoptions { "/wd4244", "/wd4334" }
  66. filter {}
  67. filter { "action:vs*" }
  68. buildoptions { "/wd6255", "/wd6297" } -- analyze
  69. filter {}
  70. filter { "kind:SharedLib" }
  71. defines { "DLL_EXPORT" }
  72. filter {}
  73. if _OPTIONS["clang"] then
  74. defines { "FLOAT_APPROX" }
  75. end