OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ios/ios_sdk.gni") | 5 import("//build/config/ios/ios_sdk.gni") |
6 import("//build/config/mac/base_rules.gni") | 6 import("//build/config/mac/base_rules.gni") |
7 import("//build/config/mac/symbols.gni") | 7 import("//build/config/mac/symbols.gni") |
8 | 8 |
9 # Control whether an intermediate source_set is used when building executables | 9 # Control whether an intermediate source_set is used when building executables |
10 # and shared_libraries for ios_app_bundle and ios_framework_bundle. This is a | 10 # and shared_libraries for ios_app_bundle and ios_framework_bundle. This is a |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 _output_name = invoker.output_name | 874 _output_name = invoker.output_name |
875 } | 875 } |
876 | 876 |
877 _has_public_headers = | 877 _has_public_headers = |
878 defined(invoker.public_headers) && invoker.public_headers != [] | 878 defined(invoker.public_headers) && invoker.public_headers != [] |
879 | 879 |
880 if (_has_public_headers) { | 880 if (_has_public_headers) { |
881 _framework_headers_target = _target_name + "_framework_headers" | 881 _framework_headers_target = _target_name + "_framework_headers" |
882 _framework_headers_config = _target_name + "_framework_headers_config" | 882 _framework_headers_config = _target_name + "_framework_headers_config" |
883 _headers_map_config = _target_name + "_headers_map" | 883 _headers_map_config = _target_name + "_headers_map" |
| 884 _install_name_config = _target_name + "_install_name" |
884 } | 885 } |
885 | 886 |
886 _arch_shared_library_source = _target_name + "_arch_shared_library_sources" | 887 _arch_shared_library_source = _target_name + "_arch_shared_library_sources" |
887 _arch_shared_library_target = _target_name + "_arch_shared_library" | 888 _arch_shared_library_target = _target_name + "_arch_shared_library" |
888 _lipo_shared_library_target = _target_name + "_shared_library" | 889 _lipo_shared_library_target = _target_name + "_shared_library" |
889 | 890 |
890 if (_use_intermediate_source_set) { | 891 if (_use_intermediate_source_set) { |
891 source_set(_arch_shared_library_source) { | 892 source_set(_arch_shared_library_source) { |
892 forward_variables_from(invoker, | 893 forward_variables_from(invoker, |
893 "*", | 894 "*", |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 ":$_framework_headers_config($default_toolchain)", | 956 ":$_framework_headers_config($default_toolchain)", |
956 ":$_headers_map_config($default_toolchain)", | 957 ":$_headers_map_config($default_toolchain)", |
957 ] | 958 ] |
958 | 959 |
959 if (!defined(deps)) { | 960 if (!defined(deps)) { |
960 deps = [] | 961 deps = [] |
961 } | 962 } |
962 deps += [ ":$_framework_headers_target($default_toolchain)" ] | 963 deps += [ ":$_framework_headers_target($default_toolchain)" ] |
963 } | 964 } |
964 } | 965 } |
| 966 configs += [ ":$_install_name_config($default_toolchain)" ] |
965 | 967 |
966 output_extension = "" | 968 output_extension = "" |
967 output_name = _output_name | 969 output_name = _output_name |
968 output_prefix_override = true | 970 output_prefix_override = true |
969 output_dir = "$target_out_dir/$current_cpu" | 971 output_dir = "$target_out_dir/$current_cpu" |
970 } | 972 } |
971 | 973 |
972 if (current_toolchain != default_toolchain) { | 974 if (current_toolchain != default_toolchain) { |
973 # For fat builds, only the default toolchain will generate a framework | 975 # For fat builds, only the default toolchain will generate a framework |
974 # bundle. For the other toolchains, the template is only used for building | 976 # bundle. For the other toolchains, the template is only used for building |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 visibility = [ ":$_framework_headers_target" ] | 1051 visibility = [ ":$_framework_headers_target" ] |
1050 sources = _public_headers | 1052 sources = _public_headers |
1051 outputs = [ | 1053 outputs = [ |
1052 "$_framework_root/Headers/{{source_file_part}}", | 1054 "$_framework_root/Headers/{{source_file_part}}", |
1053 ] | 1055 ] |
1054 } | 1056 } |
1055 | 1057 |
1056 config(_headers_map_config) { | 1058 config(_headers_map_config) { |
1057 visibility = [ ":$_target_name" ] | 1059 visibility = [ ":$_target_name" ] |
1058 include_dirs = [ _header_map_filename ] | 1060 include_dirs = [ _header_map_filename ] |
| 1061 } |
| 1062 |
| 1063 config(_install_name_config) { |
| 1064 visibility = [ ":$_target_name" ] |
1059 ldflags = [ | 1065 ldflags = [ |
1060 "-install_name", | 1066 "-install_name", |
1061 "@rpath/$_output_name.framework/$_output_name", | 1067 "@rpath/$_output_name.framework/$_output_name", |
1062 ] | 1068 ] |
1063 } | 1069 } |
1064 | 1070 |
1065 group(_framework_headers_target) { | 1071 group(_framework_headers_target) { |
1066 deps = [ | 1072 deps = [ |
1067 ":$_compile_headers_map_target", | 1073 ":$_compile_headers_map_target", |
1068 ":$_copy_public_headers_target", | 1074 ":$_copy_public_headers_target", |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 "-rpath", | 1361 "-rpath", |
1356 "-Xlinker", | 1362 "-Xlinker", |
1357 "@loader_path/Frameworks", | 1363 "@loader_path/Frameworks", |
1358 ] | 1364 ] |
1359 } | 1365 } |
1360 } | 1366 } |
1361 | 1367 |
1362 set_defaults("ios_xctest_test") { | 1368 set_defaults("ios_xctest_test") { |
1363 configs = default_executable_configs | 1369 configs = default_executable_configs |
1364 } | 1370 } |
OLD | NEW |