cmake: set packaging component for different files
[vpp.git] / src / cmake / library.cmake
index 0d1e97c..04165ff 100644 (file)
@@ -21,6 +21,7 @@ macro(add_vpp_library lib)
 
   add_library(${lib} SHARED ${ARG_SOURCES})
   target_compile_options(${lib} PRIVATE -Wall)
+  set_target_properties(${lib} PROPERTIES SOVERSION ${VPP_LIB_VERSION})
 
   # library deps
   if(ARG_LINK_LIBRARIES)
@@ -75,6 +76,10 @@ endmacro()
 function (add_vpp_headers path)
   foreach(file ${ARGN})
     get_filename_component(dir ${file} DIRECTORY)
-    install(FILES ${file} DESTINATION include/${path}/${dir})
+    install(
+      FILES ${file}
+      DESTINATION include/${path}/${dir}
+      COMPONENT vpp-dev
+    )
   endforeach()
 endfunction()