
Originally Posted by
SixDegrees
My question is simple: what, exactly, is the function supposed to do? Since no one seems to know the answer to that question, I'm left to assume that it's simply an internal function that, as already noted, returns the system-specific name of the library being built, that it is used internally by qmake for this purpose, and the multitude of examples both in the Qt tutorials and examples code and scattered, albeit inconsistently, throughout Qt's source tree itself are, in fact, pointless escapees from the development environment.
At least, that's the assumption I'm going to adopt unless someone can put forward some actual documentation.
Qt is open-source, just look into the function code:
defineReplace(qtLibraryTarget) {
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
mac:!static:contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
}
contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:RET = $$member(LIBRARY_NAME, 0)_debug
else:win32:RET = $$member(LIBRARY_NAME, 0)d
}
}
isEmpty(RET):RET = $$LIBRARY_NAME
return($$RET)
}
defineReplace(qtLibraryTarget) {
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
mac:!static:contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
}
contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:RET = $$member(LIBRARY_NAME, 0)_debug
else:win32:RET = $$member(LIBRARY_NAME, 0)d
}
}
isEmpty(RET):RET = $$LIBRARY_NAME
return($$RET)
}
To copy to clipboard, switch view to plain text mode
Like I already said, it returns the name of the library (with "d" or "_debug" appended for windows and mac respectively when running in debug mode). It's a direct equivalent of "TARGET=xyz" (apart from assigning the value of course).
Bookmarks