How can I define variables to be used in the qmake .pro file? For instance:
DEFINES += MYCONDITION # also used in C++ code
MYCONDITION {
# do something here
}
Regards,
You should use CONFIG += MYCONDITION if you want to create a conditional in the project file and DEFINES to create a conditional for header and cpp files(USING #ifdef etc)
you can use CONFIG
CONFIG += qt console newstuff
newstuff {
SOURCES += new.cpp
HEADERS += new.h
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With