mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / win / mysql_manifest.cmake
blob0557bc68b3ecb593e0d451963e34e3b08277cb3d
1 # Copyright (C) 2007 MySQL AB
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; version 2 of the License.
6
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 # GNU General Public License for more details.
11
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
16 # - MYSQL_EMBED_MANIFEST(target_name required_privs)
17 # Create a manifest for target_name.  Set the execution level to require_privs
19 # NOTE. PROCESSOR_ARCH must be defined before this MACRO is called.
21 MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs)
22   ADD_CUSTOM_COMMAND(
23     TARGET ${_target_name}
24     PRE_LINK
25     COMMAND cscript.exe 
26     ARGS "${PROJECT_SOURCE_DIR}/win/create_manifest.js" name=$(TargetName) version=${VERSION} arch=${PROCESSOR_ARCH} exe_level=${_required_privs} outfile=$(IntDir)\\$(TargetFileName).intermediate.manifest
27     COMMENT "Generates the contents of the manifest contents.")
28   ADD_CUSTOM_COMMAND(
29     TARGET ${_target_name}
30     POST_BUILD
31     COMMAND mt.exe       ARGS -nologo -hashupdate -makecdfs -manifest $(IntDir)\\$(TargetFileName).intermediate.manifest -outputresource:$(TargetPath) 
32     COMMAND makecat.exe  ARGS $(IntDir)\\$(TargetFileName).intermediate.manifest.cdf
33     COMMAND signtool.exe ARGS sign /a /t http://timestamp.verisign.com/scripts/timstamp.dll $(TargetPath)
34     COMMENT "Embeds the manifest contents, creates a cryptographic catalog, signs the target with Authenticode certificate.")
35 ENDMACRO(MYSQL_EMBED_MANIFEST)