File: codesign.cmake

package info (click to toggle)
aseba 1.6.99%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 18,760 kB
  • sloc: cpp: 44,160; ansic: 15,471; python: 1,597; javascript: 765; sh: 95; makefile: 60
file content (11 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
find_package(PythonInterp 2.0)

set(CODESIGN_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/sign.py)
macro(codesign target)
	if(WIN32 AND PYTHON_EXECUTABLE)
		if (DEFINED ENV{SIGNTOOL_SCP} OR DEFINED ENV{SIGNTOOL_PFX})
			message("-- ${target} will be signed")
			add_custom_command(TARGET ${target} COMMAND ${PYTHON_EXECUTABLE} ${CODESIGN_SCRIPT} $<TARGET_FILE:${target}>)
		endif()
	endif()
endmacro(codesign)