diff options
author | Damjan Marion <damarion@cisco.com> | 2019-03-28 20:54:47 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-03-28 20:59:04 +0000 |
commit | 9fd24793a407f2edbdf5c2d3a031bdcf894f0a69 (patch) | |
tree | 24ee51e8bd09c577a577fb5359217a7c83ad00e4 /src/cmake/plugin.cmake | |
parent | 76b5649d074ab198cbf5737ac76d21649a61bffd (diff) |
cmake: add vpp_plugin_find_library macro
Change-Id: I0b996460e05c40e74766563fb2a94c62a65063ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/cmake/plugin.cmake')
-rw-r--r-- | src/cmake/plugin.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake index 47296ed451f..1565170dedf 100644 --- a/src/cmake/plugin.cmake +++ b/src/cmake/plugin.cmake @@ -94,3 +94,12 @@ macro(add_vpp_plugin name) COMPONENT ${PLUGIN_COMPONENT} ) endmacro() + +macro(vpp_plugin_find_library plugin var name) + find_library(${var} NAMES ${name} ${ARGN}) +if (NOT ${var}) + message(WARNING "-- ${name} library not found - ${plugin} plugin disabled") + return() +endif() + message(STATUS "${plugin} plugin needs ${name} library - found at ${${var}}") +endmacro() |