summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManjukumar Matha <manjukumar.harthikote-matha@xilinx.com>2019-02-14 16:28:36 -0800
committerKhem Raj <raj.khem@gmail.com>2019-02-15 06:58:55 -0800
commit5d5c14ef491dd85f762ab797e12bd4c399957146 (patch)
tree81265604b85e86862e04063afaf1552de47c3443
parent20e298af0e5998aca4aaa96503a5ed761ca0805d (diff)
downloadmeta-openembedded-5d5c14ef491dd85f762ab797e12bd4c399957146.tar.gz
upm_git.bb: Add fix for installing the python files
Use SWIG_SUPPORT_FILES to find the list of python files generated by CMake Swig module and install those files. This should be applicable to cmake version 3.12 or higher Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch38
-rw-r--r--meta-oe/recipes-extended/upm/upm_git.bb3
2 files changed, 40 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch b/meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch
new file mode 100644
index 0000000000..4b9a195e02
--- /dev/null
+++ b/meta-oe/recipes-extended/upm/upm/0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch
@@ -0,0 +1,38 @@
1From 3707f467f9a26a7df3d41385023b43c3d08911d2 Mon Sep 17 00:00:00 2001
2From: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
3Date: Tue, 12 Feb 2019 17:46:52 -0800
4Subject: [PATCH][v3] CMakeLists.txt: Use SWIG_SUPPORT_FILES to find the list
5 of generated files for cmake version 3.12 or higher
6
7Use SWIG_SUPPORT_FILES to find the list of python files generated by
8CMake Swig module and install those files. This should be applicable to
9cmake version 3.12 or higher
10
11Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
12---
13 src/CMakeLists.txt | 8 +++++++-
14 1 file changed, 7 insertions(+), 1 deletion(-)
15
16diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
17index e19cda2..b565814 100644
18--- a/src/CMakeLists.txt
19+++ b/src/CMakeLists.txt
20@@ -337,8 +337,14 @@ macro(_upm_swig_python)
21 OUTPUT_NAME _pyupm_${libname}
22 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_PYTHON_BINARY_DIR})
23
24+ if (CMAKE_VERSION VERSION_LESS "3.12")
25+ set(support_files ${swig_extra_generated_files})
26+ else()
27+ get_property(support_files TARGET _${python_wrapper_name} PROPERTY SWIG_SUPPORT_FILES)
28+ endif()
29+
30 # Install .py's to python packages directory/upm
31- install (FILES ${swig_extra_generated_files}
32+ install (FILES ${support_files}
33 DESTINATION ${PYTHON_PACKAGES_PATH}/upm
34 COMPONENT ${CMAKE_PROJECT_NAME}-python${PYTHON_VERSION_MAJOR})
35
36--
372.7.4
38
diff --git a/meta-oe/recipes-extended/upm/upm_git.bb b/meta-oe/recipes-extended/upm/upm_git.bb
index babe5f4893..8854a33bcb 100644
--- a/meta-oe/recipes-extended/upm/upm_git.bb
+++ b/meta-oe/recipes-extended/upm/upm_git.bb
@@ -13,6 +13,7 @@ PV = "1.6.0-git${SRCPV}"
13SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \ 13SRC_URI = "git://github.com/intel-iot-devkit/${BPN}.git;protocol=http \
14 file://0001-Replace-strncpy-with-memcpy.patch \ 14 file://0001-Replace-strncpy-with-memcpy.patch \
15 file://0001-include-sys-types.h-for-uint-definition.patch \ 15 file://0001-include-sys-types.h-for-uint-definition.patch \
16 file://0001-CMakeLists.txt-Use-SWIG_SUPPORT_FILES-to-find-the-li.patch \
16 " 17 "
17 18
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
@@ -20,7 +21,7 @@ S = "${WORKDIR}/git"
20# Depends on mraa which only supports x86 and ARM for now 21# Depends on mraa which only supports x86 and ARM for now
21COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" 22COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
22 23
23inherit distutils3-base cmake 24inherit distutils3-base cmake pkgconfig
24 25
25# override this in local.conf to get needed bindings. 26# override this in local.conf to get needed bindings.
26# BINDINGS_pn-upm="python" 27# BINDINGS_pn-upm="python"