summaryrefslogtreecommitdiffstats
path: root/cmake/modules/UseMakePluginReg.cmake
blob: 0c7198d8f41560e2cd05e209688d8af51bc1779f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
function(register_plugin_files _outputfile _registertype)
	file(RELATIVE_PATH output "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/${_outputfile}")
	add_custom_command(
	    OUTPUT
	      ${_outputfile}
	    COMMAND ${Python3_EXECUTABLE}
	      ${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py
	      ${CMAKE_CURRENT_SOURCE_DIR}
	      ${_registertype}
	      ${ARGN}
	    COMMENT "Generating ${output}"
	    DEPENDS
	      ${ARGN}
	      ${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py
	)
endfunction()