[Bf-blender-cvs] [b213d82c19c] master: Cleanup/CMake: Remove dormant windows codesign code

Ray Molenkamp noreply at git.blender.org
Tue Nov 26 23:13:29 CET 2019


Commit: b213d82c19c5b677df699debc683b57349185714
Author: Ray Molenkamp
Date:   Tue Nov 26 15:13:22 2019 -0700
Branches: master
https://developer.blender.org/rBb213d82c19c5b677df699debc683b57349185714

Cleanup/CMake: Remove dormant windows codesign code

This was added years ago to prepare for code-signing the executable
but was never used, buildbots use a different mechanism now to sign
so no need to keep this around.

===================================================================

M	CMakeLists.txt
M	build_files/cmake/macros.cmake
M	build_files/cmake/platform/platform_win32.cmake
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index aeec259c3b7..e6e0abe1ab8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -564,15 +564,6 @@ if(WIN32)
   option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
   mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
 
-  option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
-  mark_as_advanced(WITH_WINDOWS_CODESIGN)
-
-  set(WINDOWS_CODESIGN_PFX CACHE FILEPATH  "Path to pfx file to use for codesigning.")
-  mark_as_advanced(WINDOWS_CODESIGN_PFX)
-
-  set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING  "password for pfx file used for codesigning.")
-  mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
-
   option(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS "Organize the visual studio projects according to source folder structure." ON)
   mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
 
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 7dff91bc2b2..3944a8b3c56 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1228,29 +1228,6 @@ macro(openmp_delayload
     endif()
 endmacro()
 
-macro(WINDOWS_SIGN_TARGET target)
-  if(WITH_WINDOWS_CODESIGN)
-    if(!SIGNTOOL_EXE)
-      error("Codesigning is enabled, but signtool is not found")
-    else()
-      if(WINDOWS_CODESIGN_PFX_PASSWORD)
-        set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD})
-      else()
-        if($ENV{PFXPASSWORD})
-          set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD})
-        else()
-          message(FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.")
-        endif()
-      endif()
-      add_custom_command(TARGET ${target}
-        POST_BUILD
-        COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}>
-        VERBATIM
-      )
-    endif()
-  endif()
-endmacro()
-
 macro(blender_precompile_headers target cpp header)
   if(MSVC)
     # get the name for the pch output file
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index c9cdef22ace..2b88c710462 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -579,17 +579,6 @@ endif()
 # used in many places so include globally, like OpenGL
 blender_include_dirs_sys("${PTHREADS_INCLUDE_DIRS}")
 
-# Find signtool.
-set(ProgramFilesX86_NAME "ProgramFiles(x86)") #env dislikes the ( )
-find_program(SIGNTOOL_EXE signtool
-  HINTS
-    "$ENV{${ProgramFilesX86_NAME}}/Windows Kits/10/bin/x86/"
-    "$ENV{ProgramFiles}/Windows Kits/10/bin/x86/"
-    "$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.1/bin/x86/"
-    "$ENV{ProgramFiles}/Windows Kits/8.1/bin/x86/"
-    "$ENV{${ProgramFilesX86_NAME}}/Windows Kits/8.0/bin/x86/"
-    "$ENV{ProgramFiles}/Windows Kits/8.0/bin/x86/"
-)
 set(WINTAB_INC ${LIBDIR}/wintab/include)
 
 if(WITH_OPENAL)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 53e84de7652..75cf841f89d 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -277,7 +277,6 @@ if(WITH_PYTHON_MODULE)
 
 else()
   add_executable(blender ${EXETYPE} ${SRC})
-  WINDOWS_SIGN_TARGET(blender)
 endif()
 
 if(WITH_BUILDINFO)



More information about the Bf-blender-cvs mailing list