summaryrefslogtreecommitdiffstats
path: root/cmake/modules/UseMakePluginReg.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /cmake/modules/UseMakePluginReg.cmake
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/UseMakePluginReg.cmake')
-rw-r--r--cmake/modules/UseMakePluginReg.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/cmake/modules/UseMakePluginReg.cmake b/cmake/modules/UseMakePluginReg.cmake
new file mode 100644
index 0000000..0c7198d
--- /dev/null
+++ b/cmake/modules/UseMakePluginReg.cmake
@@ -0,0 +1,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()