Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a8e3b18b
Commit
a8e3b18b
authored
Dec 12, 2009
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new option SIGNCODE to sign executables and dlls with digital certificates
parent
4a0af44a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
4 deletions
+49
-4
cmake/install_macros.cmake
cmake/install_macros.cmake
+47
-2
extra/CMakeLists.txt
extra/CMakeLists.txt
+2
-2
No files found.
cmake/install_macros.cmake
View file @
a8e3b18b
...
...
@@ -71,6 +71,43 @@ IF(UNIX)
ENDIF
()
ENDMACRO
()
IF
(
WIN32
)
OPTION
(
SIGNCODE
"Sign executables and dlls with digital certificate"
OFF
)
IF
(
SIGNCODE
)
SET
(
SIGNTOOL_PARAMETERS
/a /t http://timestamp.verisign.com/scripts/timstamp.dll
CACHE STRING
"parameters for signtool (list)"
)
MARK_AS_ADVANCED
(
SIGNCODE SIGNTOOL_PARAMETERS
)
ENDIF
()
IF
(
SIGNCODE
)
FIND_PROGRAM
(
SIGNTOOL_EXECUTABLE signtool
)
IF
(
NOT SIGNTOOL_EXECUTABLE
)
MESSAGE
(
FATAL_ERROR
"signtool is not found. Signing executables not possible"
)
ENDIF
()
ENDIF
()
ENDIF
()
MACRO
(
SIGN_TARGET target
)
GET_TARGET_PROPERTY
(
target_type
${
target
}
TYPE
)
IF
(
target_type AND NOT target_type MATCHES
"STATIC"
)
GET_TARGET_PROPERTY
(
target_location
${
target
}
LOCATION
)
IF
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
STRING
(
REPLACE
"
${
CMAKE_CFG_INTDIR
}
"
"
\$
{CMAKE_INSTALL_CONFIG_NAME}"
target_location
${
target_location
}
)
ENDIF
()
INSTALL
(
CODE
"EXECUTE_PROCESS(COMMAND
${
SIGNTOOL_EXECUTABLE
}
sign
${
SIGNTOOL_PARAMETERS
}
${
target_location
}
ERROR_VARIABLE ERR)
IF(NOT
\$
{ERR} EQUAL 0)
MESSAGE(FATAL_ERROR
\"
Error signing
${
target_location
}
\"
)
ENDIF()
"
)
ENDIF
()
ENDMACRO
()
# Installs targets, also installs pdbs on Windows.
#
# More stuff can be added later, e.g signing
...
...
@@ -80,8 +117,8 @@ ENDMACRO()
FUNCTION
(
MYSQL_INSTALL_TARGETS
)
CMAKE_PARSE_ARGUMENTS
(
ARG
"DESTINATION"
""
${
ARGN
}
""
${
ARGN
}
)
SET
(
TARGETS
${
ARG_DEFAULT_ARGS
}
)
IF
(
NOT TARGETS
)
...
...
@@ -90,6 +127,14 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
IF
(
NOT ARG_DESTINATION
)
MESSAGE
(
FATAL_ERROR
"Need DESTINATION parameter for MYSQL_INSTALL_TARGETS"
)
ENDIF
()
# If signing is required, sign executables before installing
IF
(
SIGNCODE
)
FOREACH
(
target
${
TARGETS
}
)
SIGN_TARGET
(
${
target
}
)
ENDFOREACH
()
ENDIF
()
INSTALL
(
TARGETS
${
TARGETS
}
DESTINATION
${
ARG_DESTINATION
}
)
SET
(
INSTALL_LOCATION
${
ARG_DESTINATION
}
)
INSTALL_DEBUG_SYMBOLS
(
"
${
TARGETS
}
"
)
...
...
extra/CMakeLists.txt
View file @
a8e3b18b
...
...
@@ -77,7 +77,7 @@ IF(UNIX)
ADD_EXECUTABLE
(
mysql_waitpid mysql_waitpid.c
)
TARGET_LINK_LIBRARIES
(
mysql_waitpid mysys
)
INSTALL
(
TARGETS
innochecksum mysql_waitpid resolve_stack_dump DESTINATION bin
)
MYSQL_INSTALL_TARGETS
(
innochecksum mysql_waitpid resolve_stack_dump DESTINATION bin
)
ENDIF
()
INSTALL
(
TARGETS perror resolveip my_print_defaults replace
DESTINATION bin
)
MYSQL_INSTALL_TARGETS
(
perror resolveip my_print_defaults
DESTINATION bin
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment