The targetdir function sets the destination directory for the compiled binary target.
targetdir ("path")
By default, the generated project files will place their compiled output in the same directory as the script. The targetdir function allows you to change this location.
Applies To
Solutions, projects, and configurations.
Parameters
path is the file system path to the directory where the compiled target file should be stored. It is specified relative to the currently executing script file.
See Also
targetname
targetextension
targetprefix
Examples
This project separates its compiled output by configuration type.
project "MyProject" configuration "Debug" targetdir "bin/debug" configuration "Release" targetdir "bin/release"



It should be mentioned that path will be relative only if it will no begin with slash, ex.
targetdir ( "/bin/debug" )will be absolute path /bin/debug no matter where is your solution placed.