-
-
Notifications
You must be signed in to change notification settings - Fork 621
linkbuildoutputs
starkos edited this page Apr 10, 2021
·
4 revisions
This wiki is no longer being maintained.
Turns on/off the automatic linking of .obj
files that are output by custom build commands. The default behaviour is to link .obj
files when they are output by custom build commands.
linkbuildoutputs "value"
value
is a boolean value, i.e. "On" or "Off".
Project configurations and rules.
Premake 5.0 or later.
Use custom build commands to copy Wavefront .obj model files around without the linker trying to link them:
filter "**/models/**.obj"
-- Copy these files into the target directory while preserving the
-- folder structure.
buildcommands {
os.translateCommands '{mkdir} "%{ path.join(cfg.buildtarget.directory, path.getdirectory(file.relpath)) }"',
os.translateCommands '{copy} "%{ file.relpath }" "%{ path.join(cfg.buildtarget.directory, path.getdirectory(file.relpath)) }"'
}
buildoutputs "%{ path.join(cfg.buildtarget.directory, file.relpath) }"
-- The default behaviour is to link .obj if a custom build command
-- outputs them, but we don't want that since these are Wavefront .obj
-- model files and not object files.
linkbuildoutputs "Off"