fix(cmake): fixed lvgl.pc source dir in install step if using FetchContent (#4815)
Co-authored-by: Gregor Copoix <gregor.copoix@ithinx.io>
This commit is contained in:
@@ -1,29 +1,29 @@
|
|||||||
=======
|
=========================
|
||||||
X11
|
X11 Display/Inputs driver
|
||||||
=======
|
=========================
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The `X11 display/input driver <https://github.com/lvgl/lvgl/src/dev/x11>`__ offers support for simulating the LVGL display
|
| The **X11** display/input `driver <https://github.com/lvgl/lvgl/src/dev/x11>`__ offers support for simulating the LVGL display and keyboard/mouse inputs in an X11 desktop window.
|
||||||
in a X11 desktop window. It is an alternative to Wayland, XCB, SDL or Qt.
|
| It is an alternative to **Wayland**, **XCB**, **SDL** or **Qt**.
|
||||||
|
|
||||||
The main purpose for this display driver is for testing/debugging the LVGL application in a Linux simulation window.
|
The main purpose for this driver is for testing/debugging the LVGL application in a **Linux** simulation window.
|
||||||
|
|
||||||
|
|
||||||
Prerequisites
|
Prerequisites
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The X11 display driver uses XLib to access the linux window manager.
|
The X11 driver uses XLib to access the linux window manager.
|
||||||
|
|
||||||
1. Install XLib: ``sudo apt-get install libx11-6`` (should be installed already)
|
1. Install XLib: ``sudo apt-get install libx11-6`` (should be installed already)
|
||||||
2. Install XLib development package: ``sudo apt-get install libx11-dev``
|
2. Install XLib development package: ``sudo apt-get install libx11-dev``
|
||||||
|
|
||||||
|
|
||||||
Configure X11 display driver
|
Configure X11 driver
|
||||||
----------------------------
|
--------------------
|
||||||
|
|
||||||
1. Enable the X11 display driver support in lv_conf.h, by cmake compiler define or by KConfig
|
1. Enable the X11 driver support in lv_conf.h, by cmake compiler define or by KConfig
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
#define LV_USE_X11 1
|
#define LV_USE_X11 1
|
||||||
@@ -56,7 +56,8 @@ Configure X11 display driver
|
|||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The minimal initialisation (e.g. in main.c, LV_X11_DIRECT_EXIT must be 1):
|
| The minimal initialisation opening a window and enabling keyboard/mouse support
|
||||||
|
| (e.g. in main.c, LV_X11_DIRECT_EXIT must be 1):
|
||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
@@ -81,8 +82,8 @@ The minimal initialisation (e.g. in main.c, LV_X11_DIRECT_EXIT must be 1):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Full initialisation with mouse pointer symbol and
|
| Full initialisation with mouse pointer symbol and own application exit handling
|
||||||
own application exit handling dependent on LV_X11_DIRECT_EXIT (can be 1 or 0)
|
| (dependent on LV_X11_DIRECT_EXIT (can be 1 or 0))
|
||||||
|
|
||||||
.. code:: c
|
.. code:: c
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ install(
|
|||||||
configure_file("${LVGL_ROOT_DIR}/lvgl.pc.in" lvgl.pc @ONLY)
|
configure_file("${LVGL_ROOT_DIR}/lvgl.pc.in" lvgl.pc @ONLY)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES "${CMAKE_BINARY_DIR}/lvgl.pc"
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/lvgl.pc"
|
||||||
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/")
|
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/")
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
|
|||||||
@@ -320,9 +320,9 @@ static void x11_window_create(lv_display_t * disp, char const * title)
|
|||||||
xd->window = XCreateSimpleWindow(xd->hdr.display, DefaultRootWindow(xd->hdr.display),
|
xd->window = XCreateSimpleWindow(xd->hdr.display, DefaultRootWindow(xd->hdr.display),
|
||||||
0, 0, hor_res, ver_res, 0, col_fg, col_bg);
|
0, 0, hor_res, ver_res, 0, col_fg, col_bg);
|
||||||
#else
|
#else
|
||||||
xd->window = XCreateWindow(xd->hdr.display, DefaultRootWindow(xd->hdr.display),
|
xd->window = XCreateWindow(xd->hdr.display, XDefaultRootWindow(xd->hdr.display),
|
||||||
0, 0, hor_res, ver_res, 0,
|
0, 0, hor_res, ver_res, 0,
|
||||||
DefaultDepth(xd->hdr.display, screen), InputOutput,
|
XDefaultDepth(xd->hdr.display, screen), InputOutput,
|
||||||
xd->visual, 0, NULL);
|
xd->visual, 0, NULL);
|
||||||
#endif
|
#endif
|
||||||
/* window manager properties (yes, use of StdProp is obsolete) */
|
/* window manager properties (yes, use of StdProp is obsolete) */
|
||||||
|
|||||||
Reference in New Issue
Block a user