PDA

View Full Version : Build Lib files



shiranraviv
2nd December 2009, 15:36
hi,
My project is depend on two lib files.
I want to had the pro file the option that:

if he doesnt find one of the he NEED TO BUILD them.

!exists(NameOfFile1.a)
{
// what to write here???
}

!exists(NameOfFile2.a)
{
// what to write here???
}

I have the makefiles of the two lib include the source.

can anyone can help me here?

thank you!

lyuts
2nd December 2009, 16:41
Are you responsible for building NameOfFile1.a static lib ?
If yes, then make sure that it is built before building its dependants.

shiranraviv
4th December 2009, 08:42
Yes im responsible for building NameOfFile1.a static lib.

And that is exactly what i want to do...
i want to make sure that it was built before build its dependants.

And i have the Makefiles ready for that,
Is there any option to write a make command to the two lib files
from my current .pro file?

Many thanks

lyuts
4th December 2009, 10:19
You can do this, for exmaple



TopDir/
TopDir.pro
YourLib/
YourLib.pro
Module/
Module.pro


Your TopDir.pro should look like this


TEMPLATE = subdirs
SUBDIRS = YourLib Module
CONFIG += ordered