You can use coder.updateBuildInfo to do that:
Alternatively you can also just pass the LIB file to codegen:
codegen foo -args {1} wrtfwd.lib
or use coder.ExternalDependency:
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!