[Interest] Is there a command line call to qmake to test the bit width?

Karl Ruetz karl.ruetz at ruetzdogz.com
Wed Mar 4 18:13:38 CET 2015


Provided you defined a mkspec when you built Qt, you can put something like this in your project file:

linux-g++-64{
message(Building for linux 64-bit)
LIBS += -lusb -L../lib64 
}
linux-g++-32{
message(Building for linux 32-bit)
LIBS += -L../lib
}
win32-g++{
message(Building for windows 32-bit)
LIBS += -L../lib
}
win64-g++{
message(Building for windows 64-bit)
LIBS += -lusb -L../lib64
}
macx-clang{
message(Building for macx-clang)
LIBS += -L../lib64 
}

This allows you print a message, set library paths, include paths, etc based on the mkspec of Qt you are building with.

Karl

> On Mar 4, 2015, at 11:05 AM, Scott Aron Bloom <scott.bloom at onshorecs.com> wrote:
> 
> I am creating two versions of my tool, 32 and 64 bit.  However, I have, more than once, started a build against the wrong path, so it was building against Qt 64 when it was supposed to build against Qt 32 (or vice versa)
>  
> Is there a qmake or some way, that in the setup scripts to my build, I can confirm the version I am running against?
> 
> Scott
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150304/034e31fe/attachment.html>


More information about the Interest mailing list