fix(cmake): add asm file compile definitions (#4884)
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
This commit is contained in:
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12.4)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
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()
|
||||
|
||||
set(LVGL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
@@ -16,7 +16,7 @@ endif( LV_CONF_PATH )
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
|
||||
# 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 DEMO_SOURCES ${LVGL_ROOT_DIR}/demos/*.c)
|
||||
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(
|
||||
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
|
||||
if(LV_CONF_PATH)
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#define __ASSEMBLY__
|
||||
#endif
|
||||
|
||||
#include "lv_blend_neon.h"
|
||||
|
||||
#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)
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
void lv_test_assert_fail(void);
|
||||
#define LV_ASSERT_HANDLER lv_test_assert_fail();
|
||||
|
||||
typedef void * lv_user_data_t;
|
||||
|
||||
#endif
|
||||
/***********************
|
||||
* TEST CONFIGS
|
||||
***********************/
|
||||
|
||||
Reference in New Issue
Block a user