summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Kumar Banerjee <vijaykumar9597@gmail.com>2019-08-31 00:02:41 +0530
committerChris Johns <chrisj@rtems.org>2019-09-02 09:12:08 +1000
commit7e5862c443df77b92416cab528492ba0eb7934e0 (patch)
tree4104e434d5c40625fddaf096e2816ce3e96c4be4
parentlvgl.py: fix include paths in build (diff)
downloadrtems-littlevgl-7e5862c443df77b92416cab528492ba0eb7934e0.tar.bz2
lvgl.py: install the lvgl headers in PREFIX following a similar tree to the source tree
This is required to be able to add the PREFIX path as the include path in an lvgl based app.
-rw-r--r--lvgl.py12
-rw-r--r--wscript1
2 files changed, 8 insertions, 5 deletions
diff --git a/lvgl.py b/lvgl.py
index bc3eae2..6d83c63 100644
--- a/lvgl.py
+++ b/lvgl.py
@@ -67,9 +67,13 @@ def build(bld):
sources, includes = source_list()
includes.append('.')
objects = []
+ include_paths = []
for source in sources:
objects.append(source[:-1] + 'o')
+ source_dir = os.path.dirname(source)
+ if source_dir not in include_paths:
+ include_paths.append(source_dir)
bld.objects(target = objects,
features = 'c',
@@ -88,10 +92,10 @@ def build(bld):
arch_inc_path = rtems.arch_bsp_include_path(bld.env.RTEMS_VERSION,
bld.env.RTEMS_ARCH_BSP)
- include_paths = ['lv_drivers/display', 'lvgl', 'lv_drivers', 'lvgl/src', '.']
- include_headers = []
+ include_paths.extend(['lvgl/', 'lv_drivers', 'lvgl/src', '.'])
for include_path in include_paths:
files = os.listdir(include_path)
- include_headers.extend([os.path.join(include_path, x) for x in files if (x[-2:] == '.h')])
+ include_headers = [os.path.join(include_path, x) for x in files if (x[-2:] == '.h')]
+ bld.install_files(os.path.join("${PREFIX}/" , arch_inc_path, include_path),
+ include_headers)
bld.install_files('${PREFIX}/' + arch_lib_path, ["liblvgl.a"])
- bld.install_files("${PREFIX}/" + arch_inc_path, include_headers)
diff --git a/wscript b/wscript
index fb5d932..03e010c 100644
--- a/wscript
+++ b/wscript
@@ -28,7 +28,6 @@
from __future__ import print_function
import lvgl
-import runpy
import sys
rtems_version = "5"