mpt-in_openmpt.lua 3.1 KB

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