From 71b2b9b1fc5f48a17ab7f4a73e7fafc939e6d0b6 Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Fri, 10 Nov 2017 16:12:02 -0800 Subject: [PATCH] JSON: Install JSON library descriptor files Install the provided json files to DATADIR. Signed-off-by: Noel Eck --- src/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0beb8437..13353ab7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -764,6 +764,13 @@ function(upm_module_init) # Install header files to include/upm/ install (FILES ${module_hpp} DESTINATION include/upm COMPONENT ${libname}) + # Install JSON library descriptor files into datadir (if they exist) + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${basename}.json") + install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/${basename}.json" + DESTINATION ${CMAKE_INSTALL_DATADIR}/upm/${basename} + COMPONENT ${basename}) + endif () + if (IPK) cpack_add_component (${libname} DISPLAY_NAME ${libname} REQUIRED INSTALL_TYPES all) set(CPACK_COMPONENT_${libname}_DESCRIPTION "${libdescription}")