diff --git a/SConstruct b/SConstruct index 9fd6faf17..dc33d0338 100644 --- a/SConstruct +++ b/SConstruct @@ -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, diff --git a/awtk_config.py b/awtk_config.py index cf1a9a732..f4e7d81cf 100644 --- a/awtk_config.py +++ b/awtk_config.py @@ -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 diff --git a/src/base/types_def.h b/src/base/types_def.h index 5009603a8..058e2273f 100644 --- a/src/base/types_def.h +++ b/src/base/types_def.h @@ -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)