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.

39 lines
1.4 KiB

package nxmediaplayermanager
import (
"android/soong/android"
"android/soong/cc"
"fmt"
"os"
)
func init() {
fmt.Println("nxmediaplayermanager init start")
android.RegisterModuleType("nxmediaplayermanager_defaults", nxmediaplayermanagerDefaultsFactory)
}
func nxmediaplayermanagerDefaultsFactory() (android.Module) {
module := cc.DefaultsFactory()
android.AddLoadHook(module, nxmediaplayermanagerDefaults)
return module
}
func nxmediaplayermanagerDefaults(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/nxmediaplayermanager")
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/nxmediaplayermanager")
p.Include_dirs = append(p.Include_dirs, "vendor/huanglong/system/nxmediaplayer/nxmediaplayerwrapper/include")
}
ctx.AppendProperties(p)
}