mpt-xmp-openmpt.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. project "xmp-openmpt"
  2. uuid "AEA14F53-ADB0-45E5-9823-81F4F36886C2"
  3. language "C++"
  4. location ( "../../build/" .. mpt_projectpathname )
  5. vpaths { ["*"] = "../../libopenmpt/" }
  6. mpt_projectname = "xmp-openmpt"
  7. dofile "../../build/premake/premake-defaults-DLL.lua"
  8. dofile "../../build/premake/premake-defaults.lua"
  9. warnings "Extra"
  10. local extincludedirs = {
  11. "../..",
  12. "../../include",
  13. "../../include/pugixml/src",
  14. }
  15. filter { "action:vs*" }
  16. includedirs ( extincludedirs )
  17. filter { "not action:vs*" }
  18. sysincludedirs ( extincludedirs )
  19. filter {}
  20. includedirs {
  21. "../..",
  22. "$(IntDir)/svn_version",
  23. "../../build/svn_version",
  24. }
  25. files {
  26. "../../libopenmpt/xmp-openmpt.cpp",
  27. "../../libopenmpt/libopenmpt_plugin_settings.hpp",
  28. "../../libopenmpt/libopenmpt_plugin_gui.hpp",
  29. "../../libopenmpt/libopenmpt_plugin_gui.cpp",
  30. "../../libopenmpt/libopenmpt_plugin_gui.rc",
  31. "../../libopenmpt/resource.h",
  32. }
  33. filter { "action:vs*", "kind:SharedLib or ConsoleApp or WindowedApp" }
  34. resdefines {
  35. "MPT_BUILD_VER_FILENAME=\"" .. mpt_projectname .. ".dll\"",
  36. "MPT_BUILD_VER_FILEDESC=\"" .. mpt_projectname .. "\"",
  37. }
  38. filter { "action:vs*", "kind:SharedLib or ConsoleApp or WindowedApp" }
  39. resincludedirs {
  40. "$(IntDir)/svn_version",
  41. "../../build/svn_version",
  42. "$(ProjDir)/../../build/svn_version",
  43. }
  44. files {
  45. "../../libopenmpt/libopenmpt_version.rc",
  46. }
  47. filter { "action:vs*", "kind:SharedLib" }
  48. resdefines { "MPT_BUILD_VER_DLL" }
  49. filter { "action:vs*", "kind:ConsoleApp or WindowedApp" }
  50. resdefines { "MPT_BUILD_VER_EXE" }
  51. filter {}
  52. characterset "Unicode"
  53. flags { "MFC" }
  54. -- work-around https://developercommunity.visualstudio.com/t/link-errors-when-building-mfc-application-with-cla/1617786
  55. if _OPTIONS["clang"] then
  56. filter {}
  57. filter { "configurations:Debug" }
  58. if true then -- _AFX_NO_MFC_CONTROLS_IN_DIALOGS
  59. ignoredefaultlibraries { "afxnmcdd.lib"}
  60. links { "afxnmcdd.lib" }
  61. end
  62. ignoredefaultlibraries { "uafxcwd.lib", "libcmtd.lib" }
  63. links { "uafxcwd.lib", "libcmtd.lib" }
  64. filter { "configurations:DebugShared" }
  65. ignoredefaultlibraries { "mfc140ud.lib", "msvcrtd.lib" }
  66. links { "mfc140ud.lib", "msvcrtd.lib" }
  67. filter { "configurations:Checked" }
  68. if true then -- _AFX_NO_MFC_CONTROLS_IN_DIALOGS
  69. ignoredefaultlibraries { "afxnmcd.lib" }
  70. links { "afxnmcd.lib" }
  71. end
  72. ignoredefaultlibraries { "uafxcw.lib", "libcmt.lib" }
  73. links { "uafxcw.lib", "libcmt.lib" }
  74. filter { "configurations:CheckedShared" }
  75. ignoredefaultlibraries { "mfc140u.lib", "msvcrt.lib" }
  76. links { "mfc140u.lib", "msvcrt.lib" }
  77. filter { "configurations:Release" }
  78. if true then -- _AFX_NO_MFC_CONTROLS_IN_DIALOGS
  79. ignoredefaultlibraries { "afxnmcd.lib" }
  80. links { "afxnmcd.lib" }
  81. end
  82. ignoredefaultlibraries { "uafxcw.lib", "libcmt.lib" }
  83. links { "uafxcw.lib", "libcmt.lib" }
  84. filter { "configurations:ReleaseShared" }
  85. ignoredefaultlibraries { "mfc140u.lib", "msvcrt.lib" }
  86. links { "mfc140u.lib", "msvcrt.lib" }
  87. filter {}
  88. end
  89. links { "libopenmpt", "zlib", "vorbis", "ogg", "mpg123", "pugixml" }
  90. filter {}
  91. prebuildcommands { "..\\..\\build\\svn_version\\update_svn_version_vs_premake.cmd $(IntDir)" }