summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-08-26 11:04:40 +0200
committerDamjan Marion <damarion@cisco.com>2018-08-26 13:50:53 +0200
commit4553c95ab7cac75838433fdd5cd3c0d0c1d6e2e6 (patch)
tree248b50ad7df32be9f1662920ed9c322e23de6b91 /src/vlibmemory
parentd16004d56c22635a0e21b177933dc39b65a3642a (diff)
cmake: add add_vpp_library and add_vpp_executable macros
Change-Id: I1382021a6f616571b4b3243ba8c8999239d10815 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlibmemory')
-rw-r--r--src/vlibmemory/CMakeLists.txt27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/vlibmemory/CMakeLists.txt b/src/vlibmemory/CMakeLists.txt
index 55c47670523..ff0d25f6a1b 100644
--- a/src/vlibmemory/CMakeLists.txt
+++ b/src/vlibmemory/CMakeLists.txt
@@ -11,11 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-vpp_add_api_files(vlibmemory_api_headers
- memclnt.api
-)
-
-add_library (vlibmemory SHARED
+add_vpp_library (vlibmemory
+ SOURCES
memory_api.c
memory_shared.c
memory_client.c
@@ -24,12 +21,8 @@ add_library (vlibmemory SHARED
vlib_api_cli.c
../vlibapi/api_shared.c
../vlibapi/node_serialize.c
-)
-target_link_libraries (vlibmemory vppinfra svm vlib)
-add_dependencies(vlibmemory vlibmemory_api_headers)
-install (TARGETS vlibmemory DESTINATION lib)
-vpp_add_header_files(vlibmemory
+ INSTALL_HEADERS
vl_memory_msg_enum.h
memory_shared.h
vl_memory_api_h.h
@@ -38,16 +31,22 @@ vpp_add_header_files(vlibmemory
api.h
memory_client.h
socket_api.h
+
+ API_FILES
+ memclnt.api
+
+ LINK_LIBRARIES vppinfra svm vlib
)
+add_dependencies(vlibmemory vlibmemory_api_headers)
-add_library (vlibmemoryclient SHARED
+add_vpp_library (vlibmemoryclient
+ SOURCES
memory_shared.c
memory_client.c
socket_client.c
../vlibapi/api_shared.c
../vlibapi/node_serialize.c
-)
-target_link_libraries (vlibmemoryclient vppinfra svm vlib)
+ LINK_LIBRARIES vppinfra svm vlib
+)
add_dependencies(vlibmemoryclient vlibmemory_api_headers)
-install (TARGETS vlibmemoryclient DESTINATION lib)