You can also use QMAKE_HOST.arch to determine on what architecture you currently run. Or if you define which one to use, can't you use the scope parameter -32 or -64?
You can also use QMAKE_HOST.arch to determine on what architecture you currently run. Or if you define which one to use, can't you use the scope parameter -32 or -64?
drescherjm (20th September 2010)
Excellent. That solves the issue.. I added message($$QMAKE_HOST.arch) to the pri file and got the expected output in the 32 and 64 bit command prompts.
X:\64Bit\VC.90\Test\qwt-5.2.1>qmake -r x:\QMakeBased\Libraries\qwt-5.2.1\qwt.pr
o
Project MESSAGE: x86_64
Reading X:/QMakeBased/Libraries/qwt-5.2.1/src/src.pro [X:/64Bit/VC.90/Test/qwt-5
.2.1/src]
Project MESSAGE: x86_64
Project MESSAGE: x86_64
Project MESSAGE: x86_64
x:\32Bit\VC.90\Temp\Qwt-5.2.1>qmake -r x:\QMakeBased\Libraries\qwt-5.2.1\qwt.pro
Project MESSAGE: x86
Reading X:/QMakeBased/Libraries/qwt-5.2.1/src/src.pro [X:/32Bit/VC.90/Temp/Qwt-5.2.1/src]
Project MESSAGE: x86
Project MESSAGE: x86
Project MESSAGE: x86
Reading X:/QMakeBased/Libraries/qwt-5.2.1/textengines/textengines.pro [X:/32Bit/VC.90/Temp/Qwt-5.2.
/textengines]
Project MESSAGE: x86
Reading X:/QMakeBased/Libraries/qwt-5.2.1/designer/designer.pro [X:/32Bit/VC.90/Temp/Qwt-5.2.1/desi
ner]
Project MESSAGE: x86
Project MESSAGE: x86
Project MESSAGE: x86
Last edited by drescherjm; 20th September 2010 at 20:41.
John
The following link helps as well. Since I want to append a suffix if I am running under x86_64.
http://developer.qt.nokia.com/faq/an...bit_or_a_64_bi
John
Thanks again.
I got it working the way I wanted with the following code:
DEBUG_SUFFIX =
RELEASE_SUFFIX =
COMPILER_STR =
ARCH_STR =
win32-msvc2008 {
COMPILER_STR = _2008
}
win32-msvc2005 {
COMPILER_STR = _2005
}
win32 {
contains(QMAKE_HOST.arch, x86_64):{
ARCH_STR = _x64
}
DEBUG_SUFFIX = _$${COMPILER_STR}$${ARCH_STR}_d
RELEASE_SUFFIX = _$${COMPILER_STR}$${ARCH_STR}_
}
Now I can update my cmake qwt finder to use the naming convention (similar to what I use in CMake).
BTW, the reason for this is I build in both 32 and 64 bit versions and 2 compilers. With this naming scheme I can have 1 lib folder for each project as part of the install and not worry about the 64 bit version trashing the 32 bit version. I hope I explained that well enough..
Last edited by drescherjm; 21st September 2010 at 00:18.
John
Bookmarks