STORM-2105 - Introduct EMBED_MANIFEST cmake macro for Windows and embed in the exes

master
Cinder 2015-05-20 22:45:15 -06:00
parent c806c5784a
commit 045779c802
6 changed files with 41 additions and 0 deletions

View File

@ -327,6 +327,7 @@ Cinder Roxley
STORM-2036
STORM-2037
STORM-2053
STORM-2105
STORM-2113
Clara Young
Coaldust Numbers

View File

@ -106,6 +106,7 @@ set(cmake_SOURCE_FILES
ViewerMiscLibs.cmake
VisualLeakDetector.cmake
## WebKitLibPlugin.cmake
WinManifest.cmake
XmlRpcEpi.cmake
ZLIB.cmake
)

View File

@ -0,0 +1,17 @@
# - Embeds a specific manifest file in a Windows binary
# Defines the following:
# EMBED_MANIFEST - embed manifest in a windows binary with mt
# Parameters - _target is the target file, type - 1 for EXE, 2 for DLL
MACRO(EMBED_MANIFEST _target type)
ADD_CUSTOM_COMMAND(
TARGET ${_target}
POST_BUILD
COMMAND "mt.exe"
ARGS
-manifest \"${CMAKE_SOURCE_DIR}\\tools\\manifests\\compatibility.manifest\"
-inputresource:\"$<TARGET_FILE:${_target}>\"\;\#${type}
-outputresource:\"$<TARGET_FILE:${_target}>\"\;\#${type}
COMMENT "Adding compatibility manifest to ${_target}"
)
ENDMACRO(EMBED_MANIFEST _target)

View File

@ -52,6 +52,7 @@ include(UI)
include(UnixInstall)
include(ViewerMiscLibs)
include(VisualLeakDetector)
include(WinManifest)
include(URIPARSER)
include(Growl)
include(ColladaDom)
@ -2034,6 +2035,8 @@ if (WINDOWS)
)
endif(USE_PRECOMPILED_HEADERS)
EMBED_MANIFEST(${VIEWER_BINARY_NAME} 1)
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
# here.
# *NOTE:Mani - This is a crappy hack to have important dependencies for the viewer_manifest copy action

View File

@ -0,0 +1,16 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
</assembly>

View File

@ -14,6 +14,7 @@ include(LLXML)
include(Linking)
include(LLSharedLibs)
include(GoogleBreakpad)
include(WinManifest)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@ -99,6 +100,8 @@ if (WINDOWS)
LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\""
)
EMBED_MANIFEST(windows-crash-logger 1)
endif (WINDOWS)
ll_deploy_sharedlibs_command(windows-crash-logger)