3.x cmake集成ffmpeg的libavcodec报错

add_library(avcodec STATIC IMPORTED GLOBAL)
set_target_properties(avcodec PROPERTIES
IMPORTED_LOCATION {platform_spec_path}/libavcodec.a INTERFACE_INCLUDE_DIRECTORIES {platform_spec_path}/include/libavcodec
)
这一步会导致jni报莫名其妙的错误,使用PRIVATE_INCLUDE_DIRECTORIES就没效果,通过 list(APPEND CC_EXTERNAL_INCLUDES)添加也是同样jni报错
In file included from native\cocos\platform\java\modules\CanvasRenderingContext2DDelegate.cpp:26:
In file included from native\cocos\platform\java\modules\CanvasRenderingContext2DDelegate.h:35:
cocos\native\cocos\platform\java\jni\JniHelper.h:67:5: error: unknown type name ‘JNIEnv’