qmake's TARGET variable is used to specify base name of the generated target. But the final filename is composed by qmake depending on the host OS rules.

Regarding

Qt Code:
  1. TEMPLATE = lib
  2. TARGET = test
To copy to clipboard, switch view to plain text mode 
it turns out to be test.dll and libtest.so for Windows and Linux respectively.

When setting up installation rules, I'd like to refer the target by its final filename rather then messing up the configuration with platform prefixes like win32 or unix.

Qt Code:
  1. target.path = $$DEPLOY_DIR
  2. target.files = <target filename here>
  3. INSTALLS += target
To copy to clipboard, switch view to plain text mode 
There's the same named TARGET variable in generated Makefile, but it is impossible to use it directly in target.files.