|
| 1 | +diff --git a/env_support/cmake/custom.cmake b/env_support/cmake/custom.cmake |
| 2 | +index 7da68124b..1fbe2d3de 100644 |
| 3 | +--- a/env_support/cmake/custom.cmake |
| 4 | ++++ b/env_support/cmake/custom.cmake |
| 5 | +@@ -15,8 +15,6 @@ get_filename_component(LV_CONF_DIR ${LV_CONF_PATH} DIRECTORY) |
| 6 | + option(BUILD_SHARED_LIBS "Build shared libraries" OFF) |
| 7 | + |
| 8 | + file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c) |
| 9 | +-file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c) |
| 10 | +-file(GLOB_RECURSE DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c) |
| 11 | + |
| 12 | + if (BUILD_SHARED_LIBS) |
| 13 | + add_library(lvgl SHARED ${SOURCES}) |
| 14 | +@@ -25,10 +23,6 @@ else() |
| 15 | + endif() |
| 16 | + |
| 17 | + add_library(lvgl::lvgl ALIAS lvgl) |
| 18 | +-add_library(lvgl_examples STATIC ${EXAMPLE_SOURCES}) |
| 19 | +-add_library(lvgl::examples ALIAS lvgl_examples) |
| 20 | +-add_library(lvgl_demos STATIC ${DEMO_SOURCES}) |
| 21 | +-add_library(lvgl::demos ALIAS lvgl_demos) |
| 22 | + |
| 23 | + target_compile_definitions( |
| 24 | + lvgl PUBLIC $<$<BOOL:${LV_LVGL_H_INCLUDE_SIMPLE}>:LV_LVGL_H_INCLUDE_SIMPLE> |
| 25 | +@@ -37,15 +31,6 @@ target_compile_definitions( |
| 26 | + # Include root and optional parent path of LV_CONF_PATH |
| 27 | + target_include_directories(lvgl SYSTEM PUBLIC ${LVGL_ROOT_DIR} ${LV_CONF_DIR}) |
| 28 | + |
| 29 | +-# Include /examples folder |
| 30 | +-target_include_directories(lvgl_examples SYSTEM |
| 31 | +- PUBLIC ${LVGL_ROOT_DIR}/examples) |
| 32 | +-target_include_directories(lvgl_demos SYSTEM |
| 33 | +- PUBLIC ${LVGL_ROOT_DIR}/demos) |
| 34 | +- |
| 35 | +-target_link_libraries(lvgl_examples PUBLIC lvgl) |
| 36 | +-target_link_libraries(lvgl_demos PUBLIC lvgl) |
| 37 | +- |
| 38 | + # Lbrary and headers can be installed to system using make install |
| 39 | + file(GLOB LVGL_PUBLIC_HEADERS "${CMAKE_SOURCE_DIR}/lv_conf.h" |
| 40 | + "${CMAKE_SOURCE_DIR}/lvgl.h") |
| 41 | +diff --git a/lvgl.mk b/lvgl.mk |
| 42 | +index 0ea126daa..300fb6cbe 100644 |
| 43 | +--- a/lvgl.mk |
| 44 | ++++ b/lvgl.mk |
| 45 | +@@ -1,5 +1,3 @@ |
| 46 | +-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/demos/lv_demos.mk |
| 47 | +-include $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples/lv_examples.mk |
| 48 | + include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core/lv_core.mk |
| 49 | + include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/lv_draw.mk |
| 50 | + include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra/lv_extra.mk |
| 51 | +diff --git a/src/font/lv_font.h b/src/font/lv_font.h |
| 52 | +index e3b670c87..4cceffc45 100644 |
| 53 | +--- a/src/font/lv_font.h |
| 54 | ++++ b/src/font/lv_font.h |
| 55 | +@@ -132,114 +132,10 @@ static inline lv_coord_t lv_font_get_line_height(const lv_font_t * font_p) |
| 56 | + |
| 57 | + #define LV_FONT_DECLARE(font_name) extern const lv_font_t font_name; |
| 58 | + |
| 59 | +-#if LV_FONT_MONTSERRAT_8 |
| 60 | +-LV_FONT_DECLARE(lv_font_montserrat_8) |
| 61 | +-#endif |
| 62 | +- |
| 63 | +-#if LV_FONT_MONTSERRAT_10 |
| 64 | +-LV_FONT_DECLARE(lv_font_montserrat_10) |
| 65 | +-#endif |
| 66 | +- |
| 67 | +-#if LV_FONT_MONTSERRAT_12 |
| 68 | +-LV_FONT_DECLARE(lv_font_montserrat_12) |
| 69 | +-#endif |
| 70 | +- |
| 71 | + #if LV_FONT_MONTSERRAT_14 |
| 72 | + LV_FONT_DECLARE(lv_font_montserrat_14) |
| 73 | + #endif |
| 74 | + |
| 75 | +-#if LV_FONT_MONTSERRAT_16 |
| 76 | +-LV_FONT_DECLARE(lv_font_montserrat_16) |
| 77 | +-#endif |
| 78 | +- |
| 79 | +-#if LV_FONT_MONTSERRAT_18 |
| 80 | +-LV_FONT_DECLARE(lv_font_montserrat_18) |
| 81 | +-#endif |
| 82 | +- |
| 83 | +-#if LV_FONT_MONTSERRAT_20 |
| 84 | +-LV_FONT_DECLARE(lv_font_montserrat_20) |
| 85 | +-#endif |
| 86 | +- |
| 87 | +-#if LV_FONT_MONTSERRAT_22 |
| 88 | +-LV_FONT_DECLARE(lv_font_montserrat_22) |
| 89 | +-#endif |
| 90 | +- |
| 91 | +-#if LV_FONT_MONTSERRAT_24 |
| 92 | +-LV_FONT_DECLARE(lv_font_montserrat_24) |
| 93 | +-#endif |
| 94 | +- |
| 95 | +-#if LV_FONT_MONTSERRAT_26 |
| 96 | +-LV_FONT_DECLARE(lv_font_montserrat_26) |
| 97 | +-#endif |
| 98 | +- |
| 99 | +-#if LV_FONT_MONTSERRAT_28 |
| 100 | +-LV_FONT_DECLARE(lv_font_montserrat_28) |
| 101 | +-#endif |
| 102 | +- |
| 103 | +-#if LV_FONT_MONTSERRAT_30 |
| 104 | +-LV_FONT_DECLARE(lv_font_montserrat_30) |
| 105 | +-#endif |
| 106 | +- |
| 107 | +-#if LV_FONT_MONTSERRAT_32 |
| 108 | +-LV_FONT_DECLARE(lv_font_montserrat_32) |
| 109 | +-#endif |
| 110 | +- |
| 111 | +-#if LV_FONT_MONTSERRAT_34 |
| 112 | +-LV_FONT_DECLARE(lv_font_montserrat_34) |
| 113 | +-#endif |
| 114 | +- |
| 115 | +-#if LV_FONT_MONTSERRAT_36 |
| 116 | +-LV_FONT_DECLARE(lv_font_montserrat_36) |
| 117 | +-#endif |
| 118 | +- |
| 119 | +-#if LV_FONT_MONTSERRAT_38 |
| 120 | +-LV_FONT_DECLARE(lv_font_montserrat_38) |
| 121 | +-#endif |
| 122 | +- |
| 123 | +-#if LV_FONT_MONTSERRAT_40 |
| 124 | +-LV_FONT_DECLARE(lv_font_montserrat_40) |
| 125 | +-#endif |
| 126 | +- |
| 127 | +-#if LV_FONT_MONTSERRAT_42 |
| 128 | +-LV_FONT_DECLARE(lv_font_montserrat_42) |
| 129 | +-#endif |
| 130 | +- |
| 131 | +-#if LV_FONT_MONTSERRAT_44 |
| 132 | +-LV_FONT_DECLARE(lv_font_montserrat_44) |
| 133 | +-#endif |
| 134 | +- |
| 135 | +-#if LV_FONT_MONTSERRAT_46 |
| 136 | +-LV_FONT_DECLARE(lv_font_montserrat_46) |
| 137 | +-#endif |
| 138 | +- |
| 139 | +-#if LV_FONT_MONTSERRAT_48 |
| 140 | +-LV_FONT_DECLARE(lv_font_montserrat_48) |
| 141 | +-#endif |
| 142 | +- |
| 143 | +-#if LV_FONT_MONTSERRAT_12_SUBPX |
| 144 | +-LV_FONT_DECLARE(lv_font_montserrat_12_subpx) |
| 145 | +-#endif |
| 146 | +- |
| 147 | +-#if LV_FONT_MONTSERRAT_28_COMPRESSED |
| 148 | +-LV_FONT_DECLARE(lv_font_montserrat_28_compressed) |
| 149 | +-#endif |
| 150 | +- |
| 151 | +-#if LV_FONT_DEJAVU_16_PERSIAN_HEBREW |
| 152 | +-LV_FONT_DECLARE(lv_font_dejavu_16_persian_hebrew) |
| 153 | +-#endif |
| 154 | +- |
| 155 | +-#if LV_FONT_SIMSUN_16_CJK |
| 156 | +-LV_FONT_DECLARE(lv_font_simsun_16_cjk) |
| 157 | +-#endif |
| 158 | +- |
| 159 | +-#if LV_FONT_UNSCII_8 |
| 160 | +-LV_FONT_DECLARE(lv_font_unscii_8) |
| 161 | +-#endif |
| 162 | +- |
| 163 | +-#if LV_FONT_UNSCII_16 |
| 164 | +-LV_FONT_DECLARE(lv_font_unscii_16) |
| 165 | +-#endif |
| 166 | +- |
| 167 | + /*Declare the custom (user defined) fonts*/ |
| 168 | + #ifdef LV_FONT_CUSTOM_DECLARE |
| 169 | + LV_FONT_CUSTOM_DECLARE |
| 170 | +diff --git a/src/font/lv_font.mk b/src/font/lv_font.mk |
| 171 | +index 2201b73f2..7b2707da4 100644 |
| 172 | +--- a/src/font/lv_font.mk |
| 173 | ++++ b/src/font/lv_font.mk |
| 174 | +@@ -2,33 +2,7 @@ CSRCS += lv_font.c |
| 175 | + CSRCS += lv_font_fmt_txt.c |
| 176 | + CSRCS += lv_font_loader.c |
| 177 | + |
| 178 | +-CSRCS += lv_font_dejavu_16_persian_hebrew.c |
| 179 | +-CSRCS += lv_font_montserrat_8.c |
| 180 | +-CSRCS += lv_font_montserrat_10.c |
| 181 | +-CSRCS += lv_font_montserrat_12.c |
| 182 | +-CSRCS += lv_font_montserrat_12_subpx.c |
| 183 | + CSRCS += lv_font_montserrat_14.c |
| 184 | +-CSRCS += lv_font_montserrat_16.c |
| 185 | +-CSRCS += lv_font_montserrat_18.c |
| 186 | +-CSRCS += lv_font_montserrat_20.c |
| 187 | +-CSRCS += lv_font_montserrat_22.c |
| 188 | +-CSRCS += lv_font_montserrat_24.c |
| 189 | +-CSRCS += lv_font_montserrat_26.c |
| 190 | +-CSRCS += lv_font_montserrat_28.c |
| 191 | +-CSRCS += lv_font_montserrat_28_compressed.c |
| 192 | +-CSRCS += lv_font_montserrat_30.c |
| 193 | +-CSRCS += lv_font_montserrat_32.c |
| 194 | +-CSRCS += lv_font_montserrat_34.c |
| 195 | +-CSRCS += lv_font_montserrat_36.c |
| 196 | +-CSRCS += lv_font_montserrat_38.c |
| 197 | +-CSRCS += lv_font_montserrat_40.c |
| 198 | +-CSRCS += lv_font_montserrat_42.c |
| 199 | +-CSRCS += lv_font_montserrat_44.c |
| 200 | +-CSRCS += lv_font_montserrat_46.c |
| 201 | +-CSRCS += lv_font_montserrat_48.c |
| 202 | +-CSRCS += lv_font_simsun_16_cjk.c |
| 203 | +-CSRCS += lv_font_unscii_8.c |
| 204 | +-CSRCS += lv_font_unscii_16.c |
| 205 | + |
| 206 | + DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font |
| 207 | + VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font |
0 commit comments