I am creating a wizard... and I have a question. The command AddLinkLib add a lib to target with an appending policy. What's the command for prepending instead?
Check the docs here: http://wiki.codeblocks.org/index.php/Scripting_commands#CompileOptionsBase
I suppose you can use GetLinkLibs and then use SetLinkLibs. Or build an array of libs and then set it at the end. It is up to you.
What I want to do is this:
At the Project level... I just AddLinkLib.. as usual...
Then at the Target level... AddLinkLib action is default to orAppendToParentOptions... so the question how can I change it to --> orPrependToParentOptions...
For this you use CompileTargetBase::GetOptionRelation and CompileTargetBase::SetOptionRelation, I think.
Perfect! Thanks. That did it. I use target.SetOptionRelation(ortLinkerOptions, 2);
You can use one of the enum OptionsRelation names instead of plain 2. It is shown in the docs on the page I've linked.
Yes, I know. I was just do a quick test. I use the constant "orPrependToParentOptions" mentioned above. The final code is:
target.SetOptionRelation(ortLinkerOptions, orPrependToParentOptions);
target.AddLinkLib(_T("TheLib"));
Anyway, thanks again.