summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorunknown <iggy@amd64.(none)>2007-07-25 13:18:12 -0400
committerunknown <iggy@amd64.(none)>2007-07-25 13:18:12 -0400
commita34879ebd2c6c02f77a2df080c4696f0039ebffa (patch)
tree623fcc797d96706b72d917a9c10fd8f6c7fc0c05 /CMakeLists.txt
parent1370b325c65337bbe79ad0e7739e9e663444c481 (diff)
downloadmariadb-git-a34879ebd2c6c02f77a2df080c4696f0039ebffa.tar.gz
Bug#24732 Executables do not include Vista manifests
- Sign executables with MySQL AB security certificate. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Ignore security catalog descriptions CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Search for additional tools necessary to embed, catalog and sign targets. win/README: Bug#24732 Executables do not include Vista manifests - Add internal only note to EMBED_MANIFESTS option. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Added publicKeyToken attribute to manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Add additional commands to create security catalog and sign targets. - Add parameters to add appropiate hash attribute to manifest and create security content description of the security catalog.
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt38
1 files changed, 32 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cdd0cde8b8d..3703548ebc3 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,21 +139,47 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D _CRT_SECURE_NO_DEPRECATE")
IF(EMBED_MANIFESTS)
- # Search for the Manifest tool. CMake will first search it's defaults
- # (CMAKE_FRAMEWORK_PATH, CMAKE_APPBUNDLE_PATH, CMAKE_PROGRAM_PATH and
- # the system PATH) followed by the listed paths which are the current
- # possible defaults and should be updated when necessary. The custom
- # manifests are designed to be compatible with all mt versions.
+ # Search for the tools (mt, makecat, signtool) necessary for embedding
+ # manifests and signing executables with the MySQL AB authenticode cert.
+ #
+ # CMake will first search it's defaults (CMAKE_FRAMEWORK_PATH,
+ # CMAKE_APPBUNDLE_PATH, CMAKE_PROGRAM_PATH and the system PATH) followed
+ # by the listed paths which are the current possible defaults and should be
+ # updated when necessary.
+ #
+ # The custom manifests are designed to be compatible with all mt versions.
+ # The MySQL AB Authenticode certificate is available only internally.
+ # Others should store a single signing certificate in a local cryptographic
+ # service provider and alter the signtool command as necessary.
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
PATHS
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
+ FIND_PROGRAM(HAVE_CATALOG_TOOL NAMES makecat
+ PATHS
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin")
+ FIND_PROGRAM(HAVE_SIGN_TOOL NAMES signtool
+ PATHS
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
+ "$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
+
IF(HAVE_MANIFEST_TOOL)
- MESSAGE(STATUS "Found Mainfest Tool. Embedding custom manifests.")
+ MESSAGE(STATUS "Found Mainfest Tool.")
ELSE(HAVE_MANIFEST_TOOL)
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
ENDIF(HAVE_MANIFEST_TOOL)
+ IF(HAVE_CATALOG_TOOL)
+ MESSAGE(STATUS "Found Catalog Tool.")
+ ELSE(HAVE_CATALOG_TOOL)
+ MESSAGE(FATAL_ERROR "Catalog tool, makecat.exe, can't be found.")
+ ENDIF(HAVE_CATALOG_TOOL)
+ IF(HAVE_SIGN_TOOL)
+ MESSAGE(STATUS "Found Sign Tool. Embedding custom manifests and signing executables.")
+ ELSE(HAVE_SIGN_TOOL)
+ MESSAGE(FATAL_ERROR "Sign tool, signtool.exe, can't be found.")
+ ENDIF(HAVE_SIGN_TOOL)
+
# Disable automatic manifest generation.
STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
${CMAKE_EXE_LINKER_FLAGS})