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
Hide 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
...
@@ -36,7 +36,9 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
...
@@ -36,7 +36,9 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
STRING
(
REPLACE
"
${
CMAKE_CFG_INTDIR
}
"
"
\$
{CMAKE_INSTALL_CONFIG_NAME}"
pdb_location
${
pdb_location
}
)
STRING
(
REPLACE
"
${
CMAKE_CFG_INTDIR
}
"
"
\$
{CMAKE_INSTALL_CONFIG_NAME}"
pdb_location
${
pdb_location
}
)
ENDIF
()
ENDIF
()
IF
(
target STREQUAL
"mysqld"
)
IF
(
target STREQUAL
"mysqld"
)
SET
(
comp Server
)
SET
(
comp Server
)
ELSEIF
(
pdb_location MATCHES
"mysql-test"
)
SET
(
comp Tests
)
ELSE
()
ELSE
()
SET
(
comp Debuginfo
)
SET
(
comp Debuginfo
)
ENDIF
()
ENDIF
()
...
@@ -78,7 +80,6 @@ FUNCTION(INSTALL_MANPAGE file)
...
@@ -78,7 +80,6 @@ FUNCTION(INSTALL_MANPAGE file)
ELSE
()
ELSE
()
SET
(
SECTION man8
)
SET
(
SECTION man8
)
ENDIF
()
ENDIF
()
MESSAGE
(
"huj!"
)
INSTALL
(
FILES
"
${
MANPAGE
}
"
DESTINATION
"
${
INSTALL_MANDIR
}
/
${
SECTION
}
"
INSTALL
(
FILES
"
${
MANPAGE
}
"
DESTINATION
"
${
INSTALL_MANDIR
}
/
${
SECTION
}
"
COMPONENT ManPages
)
COMPONENT ManPages
)
ENDIF
()
ENDIF
()
...
@@ -150,34 +151,26 @@ IF(WIN32)
...
@@ -150,34 +151,26 @@ IF(WIN32)
SET
(
SIGNTOOL_PARAMETERS
SET
(
SIGNTOOL_PARAMETERS
/a /t http://timestamp.verisign.com/scripts/timstamp.dll
/a /t http://timestamp.verisign.com/scripts/timstamp.dll
CACHE STRING
"parameters for signtool (list)"
)
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
)
IF
(
NOT SIGNTOOL_EXECUTABLE
)
MESSAGE
(
FATAL_ERROR
MESSAGE
(
FATAL_ERROR
"signtool is not found. Signing executables not possible"
)
"signtool is not found. Signing executables not possible"
)
ENDIF
()
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
)
MARK_AS_ADVANCED
(
SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS
)
ENDIF
()
ENDIF
()
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
)
GET_TARGET_PROPERTY
(
target_type
${
target
}
TYPE
)
IF
(
target_type AND NOT target_type MATCHES
"STATIC"
)
IF
(
target_type AND NOT target_type MATCHES
"STATIC"
)
GET_TARGET_PROPERTY
(
target_location
${
target
}
LOCATION
)
GET_TARGET_PROPERTY
(
target_location
${
target
}
LOCATION
)
...
@@ -187,12 +180,17 @@ MACRO(SIGN_TARGET target)
...
@@ -187,12 +180,17 @@ MACRO(SIGN_TARGET target)
ENDIF
()
ENDIF
()
INSTALL
(
CODE
INSTALL
(
CODE
"EXECUTE_PROCESS(COMMAND
"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)
RESULT_VARIABLE ERR)
IF(NOT
\$
{ERR} EQUAL 0)
ENDIF()
MESSAGE(FATAL_ERROR
\"
Error signing
${
target_location
}
\"
)
IF(NOT
\$
{ERR} EQUAL 0)
ENDIF()
MESSAGE(FATAL_ERROR
\"
Error signing '
${
target_location
}
'
\"
)
"
)
ENDIF()
"
${
comp
}
)
ENDIF
()
ENDIF
()
ENDMACRO
()
ENDMACRO
()
...
@@ -207,6 +205,10 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
...
@@ -207,6 +205,10 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
""
""
${
ARGN
}
${
ARGN
}
)
)
IF
(
ARG_COMPONENT
)
SET
(
COMP COMPONENT
${
ARG_COMPONENT
}
)
ENDIF
()
SET
(
TARGETS
${
ARG_DEFAULT_ARGS
}
)
SET
(
TARGETS
${
ARG_DEFAULT_ARGS
}
)
IF
(
NOT TARGETS
)
IF
(
NOT TARGETS
)
MESSAGE
(
FATAL_ERROR
"Need target list for MYSQL_INSTALL_TARGETS"
)
MESSAGE
(
FATAL_ERROR
"Need target list for MYSQL_INSTALL_TARGETS"
)
...
@@ -218,8 +220,8 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
...
@@ -218,8 +220,8 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
FOREACH
(
target
${
TARGETS
}
)
FOREACH
(
target
${
TARGETS
}
)
# If signing is required, sign executables before installing
# If signing is required, sign executables before installing
IF
(
SIGNCODE
AND SIGNCODE_ENABLED
)
IF
(
SIGNCODE
)
SIGN_TARGET
(
${
target
}
)
SIGN_TARGET
(
${
target
}
${
COMP
}
)
ENDIF
()
ENDIF
()
# Install man pages on Unix
# Install man pages on Unix
IF
(
UNIX
)
IF
(
UNIX
)
...
@@ -227,9 +229,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
...
@@ -227,9 +229,7 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
INSTALL_MANPAGE
(
${
target_location
}
)
INSTALL_MANPAGE
(
${
target_location
}
)
ENDIF
()
ENDIF
()
ENDFOREACH
()
ENDFOREACH
()
IF
(
ARG_COMPONENT
)
SET
(
COMP COMPONENT
${
ARG_COMPONENT
}
)
ENDIF
()
INSTALL
(
TARGETS
${
TARGETS
}
DESTINATION
${
ARG_DESTINATION
}
${
COMP
}
)
INSTALL
(
TARGETS
${
TARGETS
}
DESTINATION
${
ARG_DESTINATION
}
${
COMP
}
)
SET
(
INSTALL_LOCATION
${
ARG_DESTINATION
}
)
SET
(
INSTALL_LOCATION
${
ARG_DESTINATION
}
)
INSTALL_DEBUG_SYMBOLS
(
"
${
TARGETS
}
"
)
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