diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-03 17:22:09 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-04 02:03:58 +0000 |
commit | 121abba1a237fba2c9a9377ced3ca7a47b5eef25 (patch) | |
tree | 2afdeef6f8b2ad6bed0bf082b194d25ef4d3c31d /cmake/modules | |
parent | ebef0b0dda3dd6aba4e81bb583b0128a6032e451 (diff) |
Have individual plugin CMakeLists.txt files add library dependencies.
This removes any knowledge of plugin types from
cmake/modules/WiresharkPlugin.cmake, so that it doesn't have to be
changed if we add a new plugin type. Revert to the second argument to
add_plugin_library() and install_plugin() being the subfolder.
Change-Id: I668ab90b28c73a8b12ca8e3e906b8de2f9395ca5
Reviewed-on: https://code.wireshark.org/review/25585
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/WiresharkPlugin.cmake | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/cmake/modules/WiresharkPlugin.cmake b/cmake/modules/WiresharkPlugin.cmake index 9be5a49b35..75b62a55f9 100644 --- a/cmake/modules/WiresharkPlugin.cmake +++ b/cmake/modules/WiresharkPlugin.cmake @@ -28,17 +28,7 @@ macro(SET_MODULE_INFO _plugin _ver_major _ver_minor _ver_micro _ver_extra) add_definitions(-DPLUGIN_VERSION=\"${PLUGIN_VERSION}\") endmacro() -macro(ADD_PLUGIN_LIBRARY _plugin _plugin_type) - if(${_plugin_type} STREQUAL "epan") - set(_subfolder "epan") - set(_required_libraries "epan") - elseif(${_plugin_type} STREQUAL "wiretap") - set(_subfolder "wiretap") - set(_required_libraries "wiretap") - else() - message(FATAL_ERROR "add_plugin_library called with invalid plugin type ${_plugin_type}") - endif() - +macro(ADD_PLUGIN_LIBRARY _plugin _subfolder) add_library(${_plugin} MODULE ${PLUGIN_FILES} ${PLUGIN_RC_FILE} @@ -63,19 +53,10 @@ macro(ADD_PLUGIN_LIBRARY _plugin _plugin_type) ) endforeach() - target_link_libraries(${_plugin} ${_required_libraries}) add_dependencies(plugins ${_plugin}) endmacro() -macro(INSTALL_PLUGIN _plugin _plugin_type) - if(${_plugin_type} STREQUAL "epan") - set(_subfolder "epan") - elseif(${_plugin_type} STREQUAL "wiretap") - set(_subfolder "wiretap") - else() - message(FATAL_ERROR "install_plugin called with invalid plugin type ${_plugin_type}") - endif() - +macro(INSTALL_PLUGIN _plugin _subfolder) install(TARGETS ${_plugin} LIBRARY DESTINATION ${PLUGIN_INSTALL_LIBDIR}/${_subfolder} NAMELINK_SKIP RUNTIME DESTINATION ${PLUGIN_INSTALL_LIBDIR} |