标识为QMAKE Win64的配置 [英] Identifier for win64 configuration in Qmake

查看:1670
本文介绍了标识为QMAKE Win64的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有Qmake工程文件的Win64的标识? Qt的QMAKE先进的文件并没有提及除了Unix / MACX / win32的等。

Is there a "win64" identifier in Qmake project files? Qt Qmake advanced documentation does not mention other than unix / macx / win32.

到目前为止,我已经尝试使用:

So far I've tried using:

win32:message("using win32")
win64:message("using win64")
amd64:message("using amd64")

的结果总是用win32。

The result is always "using win32".

我必须使用单独的项目文件,x32和x64的项目,所以他们将汇编对正确的库?是否有任何其他方式的32位和64位环境之间识别?

Must I use a separate project-file for x32 and x64 projects, so they would compile against correct libraries? Is there any other way to identify between 32-bit and 64-bit environments?

推荐答案

我不喜欢这样

win32 {

    ## Windows common build here

    !contains(QMAKE_TARGET.arch, x86_64) {
        message("x86 build")

        ## Windows x86 (32bit) specific build here

    } else {
        message("x86_64 build")

        ## Windows x64 (64bit) specific build here

    }
}

这篇关于标识为QMAKE Win64的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆