chacham15
chacham15

Reputation: 14251

How do I get a defined value with Qmake?

I have a header constants.h:

#define VERSION "1.2.3"

I want to produce myexecutable-1.2.3.exe. So how do I parse the header file to get VERSION in the qmake file?

(Also, that header file is generated dynamically and changing the header to use a value defined by the qmake is not possible)

Upvotes: 2

Views: 257

Answers (1)

László Papp
László Papp

Reputation: 53155

So how do I parse the header file to get VERSION in the qmake file?

This is not possible easily. You could look into the system function with qmake to run external programs like grep and so on where available and something else where they are not, or you just send depend on it. This feels a bit fishy design though.

Upvotes: 1

Related Questions