[Qt-interest] qmake: select variables depending in compiler

Christian Döring christian.doering at uni-muenster.de
Wed Nov 11 10:29:48 CET 2009


Matthias Pospiech schrieb:
> I have a pro file which sets up my project with many libaries.
> These libaries exist for visual studio 2005, 2008, mingw and soon also 
> for linux (gcc)
>
> These libaries (dll) files are stored in different path, such as
>
> project/lib/libaryname//$${COMPILER}/debug
>
> where COMPILER has currently the values {mingw, msvc2005, msvc2008, gcc}
>
> Now I want to have an automatic selection of these paths depending on 
> the compiler currently used.
>
> How would one achieve this within qmake?
>
> Matthias
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   
Hello,

You can use QMAKE_CC or QMAKE_CXX in your .pro-File to determnine the
compiler.
If you additionally want to distinguish between different versions of
visual studio you can use $$find(QMAKE_COMPILER_DEFINES, "_MSC_VER")
which should give you something like win32-msvc2008 or win32-msvc2005
I hope that helps.

Regards
Christian



More information about the Qt-interest-old mailing list