diff options
author | João Valverde <j@v6e.pt> | 2023-12-01 18:45:48 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-12-14 16:18:35 +0000 |
commit | 7f32c90ab9b7c6f19fb38011d5cb0b7ce815046c (patch) | |
tree | 65921674336f414a68e65911425c4629cbc2929b /cmake/modules | |
parent | b52d9173f8f0201a360bc1d5ada38297a6e13553 (diff) |
plugins: Add a codecs API level
Add a minimum and maximum API level. Backward-compatible changes to
the API only bump the maximum API level. Backward incompatible
changes bump the maximum API level and the mininum, to the
new (maximum) level.
This may allow codec plugins to continue working without recompilation,
possibly with reduced functionality.
The API level is only defined for codecs because it is a small
and easy to define API, and very stable.
Maybe we could do the same for wiretap (file type) plugins. For the
various epan plugin types it seems pointless and futile. I cannot
see a scenario where a new Wireshark minor release does not increase
the minimum API level.
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/UseMakePluginReg.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/modules/UseMakePluginReg.cmake b/cmake/modules/UseMakePluginReg.cmake index 26ac0f9809..24fd4c4731 100644 --- a/cmake/modules/UseMakePluginReg.cmake +++ b/cmake/modules/UseMakePluginReg.cmake @@ -1,5 +1,5 @@ # -function(register_plugin_files _outputfile _registertype _blurb) +function(make_plugin_register _outputfile _registertype _api_level _blurb) file(RELATIVE_PATH output "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/${_outputfile}") add_custom_command( OUTPUT @@ -9,6 +9,7 @@ function(register_plugin_files _outputfile _registertype _blurb) ${CMAKE_CURRENT_SOURCE_DIR} ${_registertype} ${_blurb} + ${_api_level} ${ARGN} COMMENT "Generating ${output}" DEPENDS @@ -17,3 +18,11 @@ function(register_plugin_files _outputfile _registertype _blurb) VERBATIM ) endfunction() + +macro(register_plugin_files _outputfile _registertype _blurb) + make_plugin_register(${_outputfile} ${_registertype} 0 ${_blurb} ${ARGN}) +endmacro() + +macro(register_codec_files _outputfile _api_level _blurb) + make_plugin_register(${_outputfile} plugin_codec ${_api_level} ${_blurb} ${ARGN}) +endmacro() |