Identifier for win64 configuration in Qmake

后端 未结 5 2057
南旧
南旧 2020-12-05 13:35

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:

5条回答
  •  [愿得一人]
    2020-12-05 13:57

    I've figured out one way to do it.

    Qt allows you to pass arbitrary config parameters which you can use to separate the targets.

    By having a conditional config in your project file:

    CONFIG(myX64, myX64|myX32) {
        LIBPATH += C:\Coding\MSSDK60A\Lib\x64
    } else {
        LIBPATH += C:\Coding\MSSDK60A\Lib
    }
    

    and passing that custom config to qmake with

    qmake CONFIG+=myX64
    

    you get the wanted result.

提交回复
热议问题