qmake: Allow non-bundle apps and libs to have an Info.plist

Change-Id: I5fe5c8d3214876520b5259d478ac9ef887c61e95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-09-10 15:50:45 +02:00
parent b74cdf18e8
commit c3e93391ee
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
# Embed plist file via linker if we're not building a bundle
!isEmpty(QMAKE_INFO_PLIST) {
add_plist = false
equals(TEMPLATE, lib) {
plugin:!plugin_bundle: \
add_plist = true
else: !plugin:!lib_bundle: \
add_plist = true
} else: equals(TEMPLATE, app) {
!app_bundle: \
add_plist = true
}
$$add_plist: \
QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$shell_quote($$QMAKE_INFO_PLIST)
}

View File

@ -5,5 +5,5 @@ SOURCES = tst_qcoreapplication.cpp
HEADERS = tst_qcoreapplication.h
win32: VERSION = 1.2.3.4
else: VERSION = 1.2.3
darwin: QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,$$shell_quote($$PWD/Info.plist)
QMAKE_INFO_PLIST = $$PWD/Info.plist
requires(qtConfig(private_tests))