mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-02 17:47:28 +08:00
fix(cmake): add asm file compile definitions (#4884)
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12.4)
|
|||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
if(NOT ESP_PLATFORM)
|
if(NOT ESP_PLATFORM)
|
||||||
project(lvgl HOMEPAGE_URL https://github.com/lvgl/lvgl)
|
project(lvgl LANGUAGES C CXX ASM HOMEPAGE_URL https://github.com/lvgl/lvgl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LVGL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
|
set(LVGL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ endif( LV_CONF_PATH )
|
|||||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||||
|
|
||||||
# Set sources used for LVGL components
|
# Set sources used for LVGL components
|
||||||
file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c)
|
file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c ${LVGL_ROOT_DIR}/src/*.S)
|
||||||
file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)
|
file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c)
|
||||||
file(GLOB_RECURSE DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c)
|
file(GLOB_RECURSE DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c)
|
||||||
file(GLOB_RECURSE THORVG_SOURCES ${LVGL_ROOT_DIR}/src/libs/thorvg/*.cpp)
|
file(GLOB_RECURSE THORVG_SOURCES ${LVGL_ROOT_DIR}/src/libs/thorvg/*.cpp)
|
||||||
@@ -27,7 +27,8 @@ add_library(lvgl::lvgl ALIAS lvgl)
|
|||||||
|
|
||||||
target_compile_definitions(
|
target_compile_definitions(
|
||||||
lvgl PUBLIC $<$<BOOL:${LV_LVGL_H_INCLUDE_SIMPLE}>:LV_LVGL_H_INCLUDE_SIMPLE>
|
lvgl PUBLIC $<$<BOOL:${LV_LVGL_H_INCLUDE_SIMPLE}>:LV_LVGL_H_INCLUDE_SIMPLE>
|
||||||
$<$<BOOL:${LV_CONF_INCLUDE_SIMPLE}>:LV_CONF_INCLUDE_SIMPLE>)
|
$<$<BOOL:${LV_CONF_INCLUDE_SIMPLE}>:LV_CONF_INCLUDE_SIMPLE>
|
||||||
|
$<$<COMPILE_LANGUAGE:ASM>:__ASSEMBLY__>)
|
||||||
|
|
||||||
# Add definition of LV_CONF_PATH only if needed
|
# Add definition of LV_CONF_PATH only if needed
|
||||||
if(LV_CONF_PATH)
|
if(LV_CONF_PATH)
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
#define __ASSEMBLY__
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "lv_blend_neon.h"
|
#include "lv_blend_neon.h"
|
||||||
|
|
||||||
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON
|
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON
|
||||||
|
|||||||
@@ -51,11 +51,12 @@ extern "C" {
|
|||||||
#define LV_GC_ROOT(x) MP_STATE_PORT(x)
|
#define LV_GC_ROOT(x) MP_STATE_PORT(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
void lv_test_assert_fail(void);
|
void lv_test_assert_fail(void);
|
||||||
#define LV_ASSERT_HANDLER lv_test_assert_fail();
|
#define LV_ASSERT_HANDLER lv_test_assert_fail();
|
||||||
|
|
||||||
typedef void * lv_user_data_t;
|
typedef void * lv_user_data_t;
|
||||||
|
#endif
|
||||||
/***********************
|
/***********************
|
||||||
* TEST CONFIGS
|
* TEST CONFIGS
|
||||||
***********************/
|
***********************/
|
||||||
|
|||||||
Reference in New Issue
Block a user