ext-opusenc.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. project "opusenc"
  2. uuid "290bbf89-2572-4291-9d9c-ff021d4fd313"
  3. language "C"
  4. location ( "../../build/" .. mpt_projectpathname .. "/ext" )
  5. mpt_projectname = "opusenc"
  6. dofile "../../build/premake/premake-defaults-LIBorDLL.lua"
  7. dofile "../../build/premake/premake-defaults.lua"
  8. targetname "openmpt-opusenc"
  9. local extincludedirs = {
  10. "../../include/ogg/include",
  11. "../../include/opus/include",
  12. }
  13. filter { "action:vs*" }
  14. includedirs ( extincludedirs )
  15. filter { "not action:vs*" }
  16. sysincludedirs ( extincludedirs )
  17. filter {}
  18. includedirs {
  19. "../../include/opusenc/include",
  20. "../../include/opusenc/win32",
  21. }
  22. filter {}
  23. filter { "action:vs*" }
  24. characterset "Unicode"
  25. filter {}
  26. files {
  27. "../../include/opusenc/include/opusenc.h",
  28. }
  29. files {
  30. "../../include/opusenc/src/*.c",
  31. "../../include/opusenc/src/*.h",
  32. "../../include/opusenc/win32/*.c",
  33. "../../include/opusenc/win32/*.h",
  34. }
  35. defines { "HAVE_CONFIG_H" }
  36. defines { "OUTSIDE_SPEEX", "RANDOM_PREFIX=libopusenc" }
  37. links { "ogg", "opus" }
  38. filter { "action:vs*" }
  39. buildoptions {
  40. "/wd4018",
  41. "/wd4100",
  42. "/wd4101",
  43. "/wd4127",
  44. "/wd4244",
  45. "/wd4267",
  46. "/wd4456",
  47. "/wd4706",
  48. }
  49. filter {}
  50. filter { "action:vs*" }
  51. buildoptions {
  52. "/wd6262",
  53. } -- analyze
  54. filter {}
  55. filter { "kind:StaticLib" }
  56. defines { }
  57. filter { "kind:SharedLib" }
  58. defines { "DLL_EXPORT" }
  59. filter {}