1
- # Copyright (c) 2009, 2014 , Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2009, 2017 , Oracle and/or its affiliates. All rights reserved.
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
@@ -151,60 +151,6 @@ IF(UNIX)
151
151
ENDIF ()
152
152
ENDMACRO ()
153
153
154
- IF (WIN32 )
155
- OPTION (SIGNCODE "Sign executables and dlls with digital certificate" OFF )
156
- MARK_AS_ADVANCED (SIGNCODE )
157
- IF (SIGNCODE )
158
- SET (SIGNTOOL_PARAMETERS
159
- /a /t http://timestamp.verisign.com/scripts/timstamp.dll
160
- CACHE STRING "parameters for signtool (list)" )
161
- FIND_PROGRAM (SIGNTOOL_EXECUTABLE signtool )
162
- IF (NOT SIGNTOOL_EXECUTABLE )
163
- MESSAGE (FATAL_ERROR
164
- "signtool is not found. Signing executables not possible" )
165
- ENDIF ()
166
- IF (NOT DEFINED SIGNCODE_ENABLED )
167
- FILE (WRITE ${CMAKE_CURRENT_BINARY_DIR} /testsign.c "int main(){return 0;}" )
168
- MAKE_DIRECTORY (${CMAKE_CURRENT_BINARY_DIR} /testsign )
169
- TRY_COMPILE (RESULT ${CMAKE_CURRENT_BINARY_DIR} /testsign ${CMAKE_CURRENT_BINARY_DIR} /testsign.c
170
- COPY_FILE ${CMAKE_CURRENT_BINARY_DIR} /testsign.exe
171
- )
172
-
173
- EXECUTE_PROCESS (COMMAND
174
- ${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${CMAKE_CURRENT_BINARY_DIR} /testsign.exe
175
- RESULT_VARIABLE ERR ERROR_QUIET OUTPUT_QUIET
176
- )
177
- IF (ERR EQUAL 0 )
178
- SET (SIGNCODE_ENABLED 1 CACHE INTERNAL "Can sign executables" )
179
- ELSE ()
180
- MESSAGE (STATUS "Disable authenticode signing for executables" )
181
- SET (SIGNCODE_ENABLED 0 CACHE INTERNAL "Invalid or missing certificate" )
182
- ENDIF ()
183
- ENDIF ()
184
- MARK_AS_ADVANCED (SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS )
185
- ENDIF ()
186
- ENDIF ()
187
-
188
- MACRO (SIGN_TARGET target )
189
- GET_TARGET_PROPERTY (target_type ${target} TYPE )
190
- IF (target_type AND NOT target_type MATCHES "STATIC" )
191
- GET_TARGET_PROPERTY (target_location ${target} LOCATION )
192
- IF (CMAKE_GENERATOR MATCHES "Visual Studio" )
193
- STRING (REPLACE "${CMAKE_CFG_INTDIR} " "\$ {CMAKE_INSTALL_CONFIG_NAME}"
194
- target_location ${target_location} )
195
- ENDIF ()
196
- INSTALL (CODE
197
- "EXECUTE_PROCESS(COMMAND
198
- ${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${target_location}
199
- RESULT_VARIABLE ERR)
200
- IF(NOT \$ {ERR} EQUAL 0)
201
- MESSAGE(FATAL_ERROR \" Error signing ${target_location} \" )
202
- ENDIF()
203
- " )
204
- ENDIF ()
205
- ENDMACRO ()
206
-
207
-
208
154
# Installs targets, also installs pdbs on Windows.
209
155
#
210
156
#
@@ -225,10 +171,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
225
171
226
172
227
173
FOREACH (target ${TARGETS} )
228
- # If signing is required, sign executables before installing
229
- IF (SIGNCODE AND SIGNCODE_ENABLED )
230
- SIGN_TARGET (${target} )
231
- ENDIF ()
232
174
# Install man pages on Unix
233
175
IF (UNIX )
234
176
GET_TARGET_PROPERTY (target_location ${target} LOCATION )
0 commit comments