Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make the Qt project file (.pro) platform dependent?

Is there a way to include different libraries depending on the operating system with Qt-Creator?

In other words, is there an equivalent for the following lines in the .pro file:

#ifdef Q_WS_WIN
include(C:/myProject/myLybrary/my-lib.pri)
#endif

#ifdef Q_WS_X11
include(/home/user/myProject/myLybrary/my-lib.pri)
#endif

I know that the character '#' identifies a comment in the .pro file. What's the alternative here?

like image 758
Mikael Avatar asked Apr 26 '13 07:04

Mikael


1 Answers

Have you tried this:

unix: include(/home/user/myProject/myLybrary/my-lib.pri)
win32: include(C:/myProject/myLybrary/my-lib.pri)
like image 112
thuga Avatar answered Oct 14 '22 11:10

thuga