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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3bb552ea
Commit
3bb552ea
authored
Nov 30, 2011
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix signing and packaging
parent
213436c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
cmake/install_macros.cmake
cmake/install_macros.cmake
+32
-32
No files found.
cmake/install_macros.cmake
View file @
3bb552ea
...
...
@@ -37,6 +37,8 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
ENDIF
()
IF
(
target STREQUAL
"mysqld"
)
SET
(
comp Server
)
ELSEIF
(
pdb_location MATCHES
"mysql-test"
)
SET
(
comp Tests
)
ELSE
()
SET
(
comp Debuginfo
)
ENDIF
()
...
...
@@ -78,7 +80,6 @@ FUNCTION(INSTALL_MANPAGE file)
ELSE
()
SET
(
SECTION man8
)
ENDIF
()
MESSAGE
(
"huj!"
)
INSTALL
(
FILES
"
${
MANPAGE
}
"
DESTINATION
"
${
INSTALL_MANDIR
}
/
${
SECTION
}
"
COMPONENT ManPages
)
ENDIF
()
...
...
@@ -150,34 +151,26 @@ IF(WIN32)
SET
(
SIGNTOOL_PARAMETERS
/a /t http://timestamp.verisign.com/scripts/timstamp.dll
CACHE STRING
"parameters for signtool (list)"
)
FIND_PROGRAM
(
SIGNTOOL_EXECUTABLE signtool
)
FIND_PROGRAM
(
SIGNTOOL_EXECUTABLE signtool
PATHS
"$ENV{ProgramFiles}/Microsoft SDKs/Windows/v7.0A/bin"
"$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86"
)
IF
(
NOT SIGNTOOL_EXECUTABLE
)
MESSAGE
(
FATAL_ERROR
"signtool is not found. Signing executables not possible"
)
ENDIF
()
IF
(
NOT DEFINED SIGNCODE_ENABLED
)
FILE
(
WRITE
${
CMAKE_CURRENT_BINARY_DIR
}
/testsign.c
"int main(){return 0;}"
)
MAKE_DIRECTORY
(
${
CMAKE_CURRENT_BINARY_DIR
}
/testsign
)
TRY_COMPILE
(
RESULT
${
CMAKE_CURRENT_BINARY_DIR
}
/testsign
${
CMAKE_CURRENT_BINARY_DIR
}
/testsign.c
COPY_FILE
${
CMAKE_CURRENT_BINARY_DIR
}
/testsign.exe
)
EXECUTE_PROCESS
(
COMMAND
${
SIGNTOOL_EXECUTABLE
}
sign
${
SIGNTOOL_PARAMETERS
}
${
CMAKE_CURRENT_BINARY_DIR
}
/testsign.exe
RESULT_VARIABLE ERR ERROR_QUIET OUTPUT_QUIET
)
IF
(
ERR EQUAL 0
)
SET
(
SIGNCODE_ENABLED 1 CACHE INTERNAL
"Can sign executables"
)
ELSE
()
MESSAGE
(
STATUS
"Disable authenticode signing for executables"
)
SET
(
SIGNCODE_ENABLED 0 CACHE INTERNAL
"Invalid or missing certificate"
)
ENDIF
()
ENDIF
()
MARK_AS_ADVANCED
(
SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS
)
ENDIF
()
ENDIF
()
MACRO
(
SIGN_TARGET target
)
MACRO
(
SIGN_TARGET
)
MYSQL_PARSE_ARGUMENTS
(
ARG
"COMPONENT"
""
${
ARGN
}
)
SET
(
target
${
ARG_DEFAULT_ARGS
}
)
IF
(
ARG_COMPONENT
)
SET
(
comp COMPONENT
${
ARG_COMPONENT
}
)
ELSE
()
SET
(
comp
)
ENDIF
()
GET_TARGET_PROPERTY
(
target_type
${
target
}
TYPE
)
IF
(
target_type AND NOT target_type MATCHES
"STATIC"
)
GET_TARGET_PROPERTY
(
target_location
${
target
}
LOCATION
)
...
...
@@ -187,12 +180,17 @@ MACRO(SIGN_TARGET target)
ENDIF
()
INSTALL
(
CODE
"EXECUTE_PROCESS(COMMAND
${
SIGNTOOL_EXECUTABLE
}
sign
${
SIGNTOOL_PARAMETERS
}
${
target_location
}
\"
${
SIGNTOOL_EXECUTABLE
}
\"
verify /pa /q
\"
${
target_location
}
\"
RESULT_VARIABLE ERR)
IF(NOT
\$
{ERR} EQUAL 0)
EXECUTE_PROCESS(COMMAND
\"
${
SIGNTOOL_EXECUTABLE
}
\"
sign
${
SIGNTOOL_PARAMETERS
}
\"
${
target_location
}
\"
RESULT_VARIABLE ERR)
ENDIF()
IF(NOT
\$
{ERR} EQUAL 0)
MESSAGE(FATAL_ERROR
\"
Error signing
${
target_location
}
\"
)
MESSAGE(FATAL_ERROR
\"
Error signing '
${
target_location
}
'
\"
)
ENDIF()
"
)
"
${
comp
}
)
ENDIF
()
ENDMACRO
()
...
...
@@ -207,6 +205,10 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
""
${
ARGN
}
)
IF
(
ARG_COMPONENT
)
SET
(
COMP COMPONENT
${
ARG_COMPONENT
}
)
ENDIF
()
SET
(
TARGETS
${
ARG_DEFAULT_ARGS
}
)
IF
(
NOT TARGETS
)
MESSAGE
(
FATAL_ERROR
"Need target list for MYSQL_INSTALL_TARGETS"
)
...
...
@@ -218,8 +220,8 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
FOREACH
(
target
${
TARGETS
}
)
# If signing is required, sign executables before installing
IF
(
SIGNCODE
AND SIGNCODE_ENABLED
)
SIGN_TARGET
(
${
target
}
)
IF
(
SIGNCODE
)
SIGN_TARGET
(
${
target
}
${
COMP
}
)
ENDIF
()
# Install man pages on Unix
IF
(
UNIX
)
...
...
@@ -227,9 +229,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
INSTALL_MANPAGE
(
${
target_location
}
)
ENDIF
()
ENDFOREACH
()
IF
(
ARG_COMPONENT
)
SET
(
COMP COMPONENT
${
ARG_COMPONENT
}
)
ENDIF
()
INSTALL
(
TARGETS
${
TARGETS
}
DESTINATION
${
ARG_DESTINATION
}
${
COMP
}
)
SET
(
INSTALL_LOCATION
${
ARG_DESTINATION
}
)
INSTALL_DEBUG_SYMBOLS
(
"
${
TARGETS
}
"
)
...
...
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