Commit 4edf6105 authored by sdefresne's avatar sdefresne Committed by Commit bot

Add Info.plist support to ios_framework_bundle template.

iOS framework requires a valid Info.plist file, so add support for
generating it to ios_framework_bundle template.

BUG=629867

Review-Url: https://codereview.chromium.org/2164393002
Cr-Commit-Position: refs/heads/master@{#407127}
parent 496a81df
......@@ -786,6 +786,33 @@ template("ios_framework_bundle") {
}
}
if (!_is_fat_build || _is_fat_build_main_target) {
_info_plist_target = _target_name + "_info_plist"
_info_plist_bundle = _target_name + "_info_plist_bundle"
ios_info_plist(_info_plist_target) {
visibility = [ ":$_info_plist_bundle" ]
executable_name = _output_name
forward_variables_from(invoker,
[
"extra_substitutions",
"info_plist",
"info_plist_target",
])
}
bundle_data(_info_plist_bundle) {
visibility = [ ":$_framework_target" ]
forward_variables_from(invoker, [ "testonly" ])
sources = get_target_outputs(":$_info_plist_target")
outputs = [
"{{bundle_root_dir}}/Info.plist",
]
public_deps = [
":$_info_plist_target",
]
}
}
framework_bundle(_framework_target) {
forward_variables_from(invoker,
"*",
......@@ -796,6 +823,13 @@ template("ios_framework_bundle") {
])
output_name = _output_name
if (!_is_fat_build || _is_fat_build_main_target) {
if (!defined(bundle_deps)) {
bundle_deps = []
}
bundle_deps += [ ":$_info_plist_bundle" ]
}
if (_has_public_headers) {
if (!defined(public_configs)) {
public_configs = []
......
......@@ -247,6 +247,7 @@ template("framework_bundle") {
"bundle_deps",
"data_deps",
"info_plist",
"info_plist_target",
"output_name",
])
if (defined(visibility)) {
......
......@@ -61,29 +61,9 @@ tweak_info_plist("tweak_cronet_plist") {
args = []
}
# Compile plist into |output_name|.
ios_info_plist("compile_cronet_plist") {
executable_name = "Cronet"
output_name = "$target_gen_dir/Info.plist"
info_plist_target = ":tweak_cronet_plist"
}
# Bundle plist into Cronet.Framework.
bundle_data("cronet_info_plist") {
public_deps = [
":compile_cronet_plist",
]
sources = [
"$target_gen_dir/Info.plist",
]
outputs = [
"{{bundle_root_dir}}/Info.plist",
]
}
ios_framework_bundle("cronet_framework") {
output_name = "Cronet"
info_plist_target = ":tweak_cronet_plist"
deps = [
":cronet_sources",
......@@ -91,8 +71,6 @@ ios_framework_bundle("cronet_framework") {
"//net:net",
]
bundle_deps = [ ":cronet_info_plist" ]
libs = [ "UIKit.Framework" ]
public_headers = [
......
......@@ -18,6 +18,7 @@ config("config") {
ios_framework_bundle("earl_grey") {
output_name = "EarlGrey"
info_plist = "Info.plist"
testonly = true
sources = [
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIdentifier</key>
<string>org.chromium.test.${EXECUTABLE_NAME:rfc1034identifier}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
</dict>
</plist>
......@@ -6,6 +6,7 @@ import("//build/config/ios/rules.gni")
ios_framework_bundle("ochamcrest") {
output_name = "OCHamcrest"
info_plist = "Info.plist"
testonly = true
sources = [
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIdentifier</key>
<string>org.chromium.test.${EXECUTABLE_NAME:rfc1034identifier}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
</dict>
</plist>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment