Is there an "or" notation in qmake

I am using win32 , macx and unix:!macx aka. Linux if statements in my .pro file to specify specific os tasks, for example.

 win32 { TARGET = myapp RC_FILE = myapp.rc } macx { TARGET = MyApp ICON = myapp.icns QMAKE_INFO_PLIST = Info.plist } unix:!macx { # linux CONFIG(debug, debug|release) { TARGET = myapp-debug } CONFIG(release, debug|release) { TARGET = myapp } } 

This works fine for if X else , if X elseif X else and if not X , where X is the os specifier.

Is there a way to tell qmake, should it compile a block for os1 or os2 ?

+5
source share
1 answer

You can use the operator | for logical or . For instance:

 win32|macx { HEADERS += debugging.h } 

http://doc.qt.io/qt-4.8/qmake-advanced-usage.html

+6
source

Source: https://habr.com/ru/post/1215933/


All Articles