premake5.sample.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. -- Here's a sample file to show how to use prelude. You can directly copy it to
  2. -- premake5.lua to get ready to work with some libraries or tweak it.
  3. local prelude = require "prelude"
  4. local portaudio = require "prelude.libraries.portaudio"
  5. local physfs = require "prelude.libraries.physfs"
  6. local glm = require "prelude.libraries.glm"
  7. workspace "Your Project here"
  8. configurations {"Debug", "DebugOpt", "Release"}
  9. location "build"
  10. -- TODO: Decide about whether keeping the group usage here or include it in
  11. -- use's call.
  12. group "External"
  13. glm:use "None"
  14. portaudio:use "SharedLib"
  15. physfs:use "SharedLib"
  16. group ""
  17. -- I'll also try to have a common core system to factorize some programming
  18. -- elements together.
  19. project "Core"
  20. kind "StaticLib"
  21. files {"include/core/**.hpp", "src/core/**.cpp"}
  22. includedirs {""}
  23. project "Main"
  24. cppdialect "C++17"
  25. kind "ConsoleApp"
  26. files {"include/main/**.hpp", "src/main/**.cpp"}
  27. includedirs {"include"}
  28. links {"Core"}
  29. -- TODO : issues at link on VS2015. Does it happen at home?
  30. -- Need to manually check "Link Library Dependencies" every time.
  31. prelude.link_against_modules {portaudio, physfs, glm}
  32. prelude.base_project_settings()