Identifier for win64 configuration in Qmake

Identifier for win64 configuration in Qmake

Asked on January 3, 2019 in Qt.
Add Comment


  • 3 Answer(s)

    To win64 configuration in Qmake:

    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
        }
    }
    
    Answered on January 3, 2019.
    Add Comment

    The alternative answer is:

    Qt5  use QT_ARCH to notice the shape of 32 or 64 the target is 32-bit  and  entry the  i386 and  64-bit target  of the  value  is x86_64.

    contains(QT_ARCH, i386) {
        message("32-bit")
    } else {
        message("64-bit")
    }
    
    Answered on January 3, 2019.
    Add Comment

    The simple statement is:

    Modify:  Qt as a action of doing this certainly and easily, without human  difficulty.

    win32-g++:contains(QMAKE_HOST.arch, x86_64):{
        do something
    }
    
    Answered on January 3, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.