mkspecs/features/win32/embed_manifest_exe.prf
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 15:10:48 +0300
changeset 30 5dc02b23752f
parent 0 1918ee327afb
child 33 3e2da88830cd
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

MANIFEST_DIR = $$OBJECTS_DIR
isEmpty(MANIFEST_DIR):MANIFEST_DIR = .
if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") {
    NOPATH_TARGET = $$TARGET
    NOPATH_TARGET ~= s,\\ , ,q      # Remove space escaping (NOPATH_TARGET is quoted)
    NOPATH_TARGET ~= s,\\,/,g       # Change to single type separators
    NOPATH_TARGET ~= s,^(.*/)+,,    # Remove all paths
    QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${MANIFEST_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
    QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK
    QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(MANIFEST_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\" -outputresource:$(DESTDIR_TARGET);1$$escape_expand(\n\t))
    QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
    QMAKE_CLEAN += \"$$replace(MANIFEST_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
}