1 # Copyright (c) 2012 Google Inc. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 { 5 'targets': [ 6 { 7 'target_name': 'default_installname', 8 'type': 'shared_library', 9 'sources': [ 'file.c' ], 10 }, 11 { 12 'target_name': 'default_bundle_installname', 13 'product_name': 'My Framework', 14 'type': 'shared_library', 15 'mac_bundle': 1, 16 'sources': [ 'file.c' ], 17 }, 18 { 19 'target_name': 'explicit_installname', 20 'type': 'shared_library', 21 'sources': [ 'file.c' ], 22 'xcode_settings': { 23 'LD_DYLIB_INSTALL_NAME': 'Trapped in a dynamiclib factory', 24 }, 25 }, 26 { 27 'target_name': 'explicit_installname_base', 28 'type': 'shared_library', 29 'sources': [ 'file.c' ], 30 'xcode_settings': { 31 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', 32 33 }, 34 }, 35 { 36 'target_name': 'explicit_installname_base_bundle', 37 'product_name': 'My Other Framework', 38 'type': 'shared_library', 39 'mac_bundle': 1, 40 'sources': [ 'file.c' ], 41 'xcode_settings': { 42 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', 43 44 }, 45 }, 46 { 47 'target_name': 'both_base_and_installname', 48 'type': 'shared_library', 49 'sources': [ 'file.c' ], 50 'xcode_settings': { 51 # LD_DYLIB_INSTALL_NAME wins. 52 'LD_DYLIB_INSTALL_NAME': 'Still trapped in a dynamiclib factory', 53 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..', 54 }, 55 }, 56 { 57 'target_name': 'explicit_installname_with_base', 58 'type': 'shared_library', 59 'sources': [ 'file.c' ], 60 'xcode_settings': { 61 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)', 62 }, 63 }, 64 { 65 'target_name': 'explicit_installname_with_explicit_base', 66 'type': 'shared_library', 67 'sources': [ 'file.c' ], 68 'xcode_settings': { 69 'DYLIB_INSTALL_NAME_BASE': '@executable_path/..', 70 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)', 71 }, 72 }, 73 { 74 'target_name': 'executable', 75 'type': 'executable', 76 'sources': [ 'main.c' ], 77 'xcode_settings': { 78 'LD_DYLIB_INSTALL_NAME': 'Should be ignored for not shared_lib', 79 }, 80 }, 81 # Regression test for http://crbug.com/113918 82 { 83 'target_name': 'install_name_with_info_plist', 84 'type': 'shared_library', 85 'mac_bundle': 1, 86 'sources': [ 'file.c' ], 87 'xcode_settings': { 88 'INFOPLIST_FILE': 'Info.plist', 89 'LD_DYLIB_INSTALL_NAME': '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)', 90 }, 91 }, 92 ], 93 } 94