I'm using Qt 4.7.3. None of the QMAKE_TARGET or TARGET_x.y.z variables are defined. (Is the documentation wrong?) I'm using the following workaround at the moment:
Linux:
$${QMAKE开发者_高级运维_PREFIX_SHLIB}$${TARGET}.so.$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
Darwin:
$${QMAKE_PREFIX_SHLIB}$${TARGET}.$${VER_MAJ}.$${VER_MIN}.$${VER_PAT}.$${QMAKE_EXTENSION_SHLIB}
I want the string 'libName.so.1.2.3' on Linux, and 'libName.1.2.3.dylib' on OS X. These names are generated by qmake for the final product of a project, but there doesn't seem to be a single variable that contains these complete names, even though Qt's documentation implies there should be.
精彩评论