You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

package nxmediaplayerwrapper
import (
"android/soong/android"
"android/soong/cc"
"fmt"
"os"
)
func init() {
fmt.Println("nxmediaplayerwrapper init start")
android.RegisterModuleType("nxmediaplayerwrapper_defaults", nxmediaplayerwrapperDefaultsFactory)
}
func nxmediaplayerwrapperDefaultsFactory() (android.Module) {
module := cc.DefaultsFactory()
android.AddLoadHook(module, nxmediaplayerwrapperDefaults)
return module
}
func nxmediaplayerwrapperDefaults(ctx android.LoadHookContext) {
type props struct {
Include_dirs []string
}
p := &props{}
_, err := os.Stat("vendor/huanglong/modules/securec/securec")
if err == nil {
p.Include_dirs = append(p.Include_dirs, "vendor/huanglong/modules/securec/securec")
p.Include_dirs = append(p.Include_dirs, "vendor/huanglong/modules/nxplayer/system/nxmediaplayerwrapper/include")
} else {
p.Include_dirs = append(p.Include_dirs, "vendor/platform/secure_c/include")
p.Include_dirs = append(p.Include_dirs, "vendor/huanglong/system/nxmediaplayer/nxmediaplayerwrapper/include")
}
ctx.AppendProperties(p)
}