ext-portaudio.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. project "portaudio"
  2. uuid "189B867F-FF4B-45A1-B741-A97492EE69AF"
  3. language "C"
  4. location ( "../../build/" .. mpt_projectpathname .. "/ext" )
  5. mpt_projectname = "portaudio"
  6. dofile "../../build/premake/premake-defaults-LIBorDLL.lua"
  7. dofile "../../build/premake/premake-defaults.lua"
  8. targetname "openmpt-portaudio"
  9. includedirs { "../../include/portaudio/include", "../../include/portaudio/src/common", "../../include/portaudio/src/os/win" }
  10. filter {}
  11. filter { "action:vs*" }
  12. characterset "Unicode"
  13. filter {}
  14. if _OPTIONS["winxp"] then
  15. defines {
  16. "PA_USE_ASIO=0",
  17. "PA_USE_DS=1",
  18. "PA_USE_WMME=1",
  19. "PA_USE_WASAPI=1",
  20. "PA_USE_WDMKS=0",
  21. }
  22. elseif _OPTIONS["uwp"] then
  23. defines {
  24. "PA_USE_ASIO=0",
  25. "PA_USE_DS=0",
  26. "PA_USE_WMME=0",
  27. "PA_USE_WASAPI=1",
  28. "PA_USE_WDMKS=0",
  29. }
  30. else
  31. defines {
  32. "PAWIN_USE_WDMKS_DEVICE_INFO",
  33. "PA_WDMKS_NO_KSGUID_LIB",
  34. "PA_USE_ASIO=0",
  35. "PA_USE_DS=0",
  36. "PA_USE_WMME=1",
  37. "PA_USE_WASAPI=1",
  38. "PA_USE_WDMKS=1",
  39. }
  40. end
  41. filter {}
  42. files {
  43. "../../include/portaudio/src/common/pa_allocation.c",
  44. "../../include/portaudio/src/common/pa_allocation.h",
  45. "../../include/portaudio/src/common/pa_converters.c",
  46. "../../include/portaudio/src/common/pa_converters.h",
  47. "../../include/portaudio/src/common/pa_cpuload.c",
  48. "../../include/portaudio/src/common/pa_cpuload.h",
  49. "../../include/portaudio/src/common/pa_debugprint.c",
  50. "../../include/portaudio/src/common/pa_debugprint.h",
  51. "../../include/portaudio/src/common/pa_dither.c",
  52. "../../include/portaudio/src/common/pa_dither.h",
  53. "../../include/portaudio/src/common/pa_endianness.h",
  54. "../../include/portaudio/src/common/pa_front.c",
  55. "../../include/portaudio/src/common/pa_gitrevision.h",
  56. "../../include/portaudio/src/common/pa_hostapi.h",
  57. "../../include/portaudio/src/common/pa_memorybarrier.h",
  58. "../../include/portaudio/src/common/pa_process.c",
  59. "../../include/portaudio/src/common/pa_process.h",
  60. "../../include/portaudio/src/common/pa_ringbuffer.c",
  61. "../../include/portaudio/src/common/pa_ringbuffer.h",
  62. "../../include/portaudio/src/common/pa_stream.c",
  63. "../../include/portaudio/src/common/pa_stream.h",
  64. "../../include/portaudio/src/common/pa_trace.c",
  65. "../../include/portaudio/src/common/pa_trace.h",
  66. "../../include/portaudio/src/common/pa_types.h",
  67. "../../include/portaudio/src/common/pa_util.h",
  68. "../../include/portaudio/src/hostapi/skeleton/pa_hostapi_skeleton.c",
  69. "../../include/portaudio/src/os/win/pa_win_coinitialize.c",
  70. "../../include/portaudio/src/os/win/pa_win_coinitialize.h",
  71. "../../include/portaudio/src/os/win/pa_win_hostapis.c",
  72. "../../include/portaudio/src/os/win/pa_win_util.c",
  73. "../../include/portaudio/src/os/win/pa_win_waveformat.c",
  74. "../../include/portaudio/src/os/win/pa_x86_plain_converters.c",
  75. "../../include/portaudio/src/os/win/pa_x86_plain_converters.h",
  76. }
  77. filter {}
  78. if _OPTIONS["winxp"] then
  79. files {
  80. "../../include/portaudio/src/hostapi/wmme/pa_win_wmme.c",
  81. "../../include/portaudio/src/hostapi/dsound/pa_win_ds.c",
  82. "../../include/portaudio/src/hostapi/dsound/pa_win_ds_dynlink.c",
  83. "../../include/portaudio/src/hostapi/dsound/pa_win_ds_dynlink.h",
  84. "../../include/portaudio/src/hostapi/wasapi/pa_win_wasapi.c",
  85. }
  86. elseif _OPTIONS["uwp"] then
  87. files {
  88. "../../include/portaudio/src/hostapi/wasapi/pa_win_wasapi.c",
  89. }
  90. else
  91. files {
  92. "../../include/portaudio/src/hostapi/wmme/pa_win_wmme.c",
  93. "../../include/portaudio/src/hostapi/wasapi/pa_win_wasapi.c",
  94. "../../include/portaudio/src/hostapi/wdmks/pa_win_wdmks.c",
  95. "../../include/portaudio/src/os/win/pa_win_wdmks_utils.c",
  96. "../../include/portaudio/src/os/win/pa_win_wdmks_utils.h",
  97. }
  98. end
  99. filter {}
  100. files {
  101. "../../include/portaudio/include/pa_asio.h",
  102. "../../include/portaudio/include/pa_jack.h",
  103. "../../include/portaudio/include/pa_linux_alsa.h",
  104. "../../include/portaudio/include/pa_mac_core.h",
  105. "../../include/portaudio/include/pa_win_ds.h",
  106. "../../include/portaudio/include/pa_win_wasapi.h",
  107. "../../include/portaudio/include/pa_win_waveformat.h",
  108. "../../include/portaudio/include/pa_win_wdmks.h",
  109. "../../include/portaudio/include/pa_win_wmme.h",
  110. "../../include/portaudio/include/portaudio.h",
  111. }
  112. filter { "action:vs*" }
  113. buildoptions { "/wd4018", "/wd4091", "/wd4267", "/wd4312" }
  114. filter {}
  115. filter { "action:vs*" }
  116. buildoptions { "/wd6001", "/wd6011", "/wd6053", "/wd6216", "/wd6217", "/wd6255", "/wd6258", "/wd6385", "/wd6386", "/wd6387", "/wd28159" } -- /analyze
  117. filter {}
  118. filter { "action:vs*" }
  119. files { "../../build/premake/lnk/ext-portaudio.c" }
  120. filter {}
  121. filter { "configurations:Debug" }
  122. defines { "PA_ENABLE_DEBUG_OUTPUT" }
  123. filter { "configurations:DebugShared" }
  124. defines { "PA_ENABLE_DEBUG_OUTPUT" }
  125. filter { "configurations:DebugMDd" }
  126. defines { "PA_ENABLE_DEBUG_OUTPUT" }
  127. filter { "kind:SharedLib" }
  128. if _OPTIONS["winxp"] then
  129. files { "../../build/premake/def/ext-portaudio-retro.def" }
  130. else
  131. files { "../../include/portaudio/build/msvc/portaudio.def" }
  132. end
  133. filter {}