I am linking to a .a lib and need to link to the right version for the machine that’s compiling. Is there a way to detect the type of machine in a .pro file in linux? I found this article, but they only discuss Windows: http://developer.qt.nokia.com/faq/answer/how_can_i_detect_in_the_.pro_file_if_i_am_compiling_for_a_32_bit_or_a_64_bi
Edit: The .a library is Gtest. Another way to solve my problem would be to somehow build a .a file with g++ that will work on either 32-bit or 64-bit platforms. Is that possible?
By doing your conditional on a mkspec, (see Platform Scope Values here), you can check for a very large variety of compiler/platform.
My mkspec directory (Linux64 machine), gives the following differentiations: