Sample Solution

This example solution defines the common debug and release configurations. It assigns each configuration it's own output directory for the compiled binaries. Setting the output directory at the solution-level like this applies to all of the projects in the solution; if you want per-project output directories then leave this bit out.

Finally, it removes the output directory when the clean action is called, leaving the source tree in its original state.

solution "MySolution"
  configurations { "Debug", "Release" }
 
  configuration { "Debug" }
    targetdir "bin/debug"
 
  configuration { "Release" }
    targetdir "bin/release"
 
  if _ACTION == "clean" then
    os.rmdir("bin")
  end
 
  -- put your projects here