qtLibraryTarget is only defined if used with TEMPLATE=lib, which makes it fail in pri files that are used for app pro files. The tests still don't run because of run time linking issues.