import("//build/ohos.gni") expat_path = root_out_dir + "/third_party_expat" src_path = "//third_party/expat" action("deps_expat") { script = "install.sh" args = [ rebase_path(src_path, root_build_dir), rebase_path(expat_path, root_build_dir), ] inputs = [ src_path ] outputs = [ "$expat_path/expat-2.4.1/lib/expat.h", "$expat_path/expat-2.4.1/lib/xmlparse.c", "$expat_path/expat-2.4.1/lib/xmlrole.c", "$expat_path/expat-2.4.1/lib/xmltok.c", ] } ## Build expat.a {{{ config("expat_config") { visibility = [ ":*" ] include_dirs = [] cflags = [ "-DXML_POOR_ENTROPY", "-Wno-sign-compare", ] } config("expat_public_config") { include_dirs = [ "$expat_path/expat-2.4.1", "$expat_path/expat-2.4.1/lib", ] defines = [ "XML_STATIC" ] } ohos_static_library("expat") { part_name = "expat" subsystem_name = "thirdparty" deps = [ ":deps_expat" ] sources = [ "$expat_path/expat-2.4.1/lib/expat.h", "$expat_path/expat-2.4.1/lib/xmlparse.c", "$expat_path/expat-2.4.1/lib/xmlrole.c", "$expat_path/expat-2.4.1/lib/xmltok.c", ] configs = [ ":expat_config" ] public_configs = [ ":expat_public_config" ] public_deps = [] } ## Build expat.a }}}