Manifest for windows 10

This commit is contained in:
Drake Arconis
2016-01-16 16:39:36 -05:00
parent 466cc68580
commit a17b849d84
6 changed files with 41 additions and 5 deletions

View File

@@ -90,11 +90,6 @@ if (WINDOWS)
# configure win32 API for windows Vista+ compatibility
set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
endif (WINDOWS)
set (GCC_EXTRA_OPTIMIZATIONS "-ffast-math")

View File

@@ -98,6 +98,7 @@ set(cmake_SOURCE_FILES
UnixInstall.cmake
Variables.cmake
ViewerMiscLibs.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 type)