mBardos
mBardos

Reputation: 3077

How can I define dependencies between INSTALLS targets in qmake?

I have several modules that I want to install (make install step) using qmake's INSTALLS: INSTALLS = module1 module2 module3. These install from different source folders, to same destination folder tree. Till now all nice and good...

But when running "make install -j 3", sometimes, I was getting: "cp: cannot create directory ‘/my/target/folder/’: File exists

Can I define some dependency between the modules, so module2 is installed only when installing module1 is finished?

Upvotes: 0

Views: 313

Answers (1)

mBardos
mBardos

Reputation: 3077

To solve this, I used this article. So if anyone is in the same situation, the solution looks like this:

module1.path = /my/target/folder module1.files = /my/source/folder1/subFolder1

module2.path = /my/target/folder module2.files = /my/source/folder1/subFolder1/subfolder2 module2.depends = install_module1 # the "install_" prefix is the key to this

INSTALLS = module1 module2

I hope this helps someone avoid my struggle...

Upvotes: 1

Related Questions