Faisal Azahrani
Faisal Azahrani

Reputation: 123

How to set the name of the precompiled headers folder in qmake?

I am writing a cross-platforms desktop application using qt creator as an IDE. Today, I started working on the Linux port of the application and encountered a problem related to qmake.

On Windows, qmake creates the folder TARGET which contains the precompiled headers and next to it, TARGET.exe the application executable.

On Linux however, both the folder and the executable have the same name TARGET causing the linker to fail creating the executable.

The only workaround that I can think of is manually specifying the precompiled headers folder name.

The question is, how to do this?

Upvotes: 2

Views: 228

Answers (2)

kambala
kambala

Reputation: 2511

Found solution here: use undocumented variable PRECOMPILED_DIR to set output directory of the created pch.

Upvotes: 3

smaryus
smaryus

Reputation: 349

You can make an temporary folder and call from that folder "qmake ../Your_pro_file.pro" and then just call "make". Does it work ?

Upvotes: 0

Related Questions