improve build script for user custom widgets

This commit is contained in:
lixianjing 2020-05-20 16:55:10 +08:00
parent 91304f2470
commit 3c0daed384
3 changed files with 4 additions and 5 deletions

View File

@ -6,7 +6,7 @@ if awtk.TOOLS_NAME != '' :
APP_TOOLS = [awtk.TOOLS_NAME]
DefaultEnvironment(TOOLS = APP_TOOLS,
CCFLAGS = awtk.CCFLAGS,
CCFLAGS = awtk.AWTK_CCFLAGS,
LIBS = awtk.LIBS,
LIBPATH = awtk.LIBPATH,
CPPPATH = awtk.CPPPATH,

View File

@ -224,6 +224,7 @@ CFLAGS=COMMON_CFLAGS
LINKFLAGS=OS_LINKFLAGS;
LIBPATH=[TK_LIB_DIR, TK_BIN_DIR] + OS_LIBPATH
CCFLAGS=OS_FLAGS + COMMON_CCFLAGS
AWTK_CCFLAGS=OS_FLAGS + COMMON_CCFLAGS + ' -DWITH_WIDGET_TYPE_CHECK=1 '
STATIC_LIBS = AWTK_STATIC_LIBS + NANOVG_BACKEND_LIBS + ['SDL2', 'glad'] + OS_LIBS
SHARED_LIBS=['awtk'] + OS_LIBS;
@ -271,7 +272,9 @@ os.environ['FRAME_BUFFER_FORMAT'] = FRAME_BUFFER_FORMAT;
os.environ['OS_WHOLE_ARCHIVE'] = OS_WHOLE_ARCHIVE;
os.environ['AWTK_DLL_DEPS_LIBS'] = ';'.join(AWTK_DLL_DEPS_LIBS)
os.environ['STATIC_LIBS'] = ';'.join(STATIC_LIBS)
os.environ['WITH_AWTK_SO'] = 'true'
os.environ['AWTK_CCFLAGS'] = AWTK_CCFLAGS;
def has_custom_cc():
return False

View File

@ -267,10 +267,6 @@ typedef struct _widget_animator_t widget_animator_t;
#define TK_LONG_PRESS_TIME 1000
#if defined(WITH_SDL) || defined(LINUX) || defined(AWTK_WEB)
#define WITH_WIDGET_TYPE_CHECK 1
#endif /*WITH_SDL || defined(LINUX)*/
#ifdef WITH_WIDGET_TYPE_CHECK
#define TK_REF_VTABLE(vt) &(g_##vt##_vtable)
#define TK_PARENT_VTABLE(vt) TK_REF_VTABLE(vt)