mactime: add a "top" command to watch device stats
[vpp.git] / src / plugins / mactime / CMakeLists.txt
index 5f82f4c..5477674 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-add_vpp_plugin(mactime_plugin
-  mactime.api
+add_vpp_plugin(mactime
+  SOURCES
   mactime.c
   node.c
-)
 
-add_vpp_api_test_plugin(mactime_test_plugin
+  API_FILES
   mactime.api
+
+  API_TEST_SOURCES
   mactime_test.c
 )
 
+option(VPP_BUILD_MACTIME_TOP "Build mactime plugin 'top' tool" OFF)
+if(VPP_BUILD_MACTIME_TOP)
+  add_vpp_executable(mactime_top ENABLE_EXPORTS
+    SOURCES
+    mactime_top.c
+
+    DEPENDS api_headers
+
+    LINK_LIBRARIES
+    vlibmemoryclient
+    vppapiclient
+    svm
+    vppinfra
+    Threads::Threads
+    rt m dl crypto
+    )
+endif()