Commit 57871bcf authored by lliabraa@chromium.org's avatar lliabraa@chromium.org

Update iossim.gyp to use src/build/ios/mac_build.gypi.

The mac_build.gypi will build the iossim executable using ninja.

BUG=None


Review URL: https://chromiumcodereview.appspot.com/10827200

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152335 0039d316-1c4b-4281-b951-d872f2087c98
parent 5e93fa16
...@@ -894,6 +894,11 @@ ...@@ -894,6 +894,11 @@
'use_system_bzip2%': 1, 'use_system_bzip2%': 1,
'use_system_libxml%': 1, 'use_system_libxml%': 1,
'use_system_sqlite%': 1, 'use_system_sqlite%': 1,
# The Mac SDK is set for iOS builds and passed through to Mac
# sub-builds. This allows the Mac sub-build SDK in an iOS build to be
# overridden from the command line the same way it is for a Mac build.
'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
}], }],
['OS=="android"', { ['OS=="android"', {
# Location of Android NDK. # Location of Android NDK.
......
...@@ -64,6 +64,9 @@ ...@@ -64,6 +64,9 @@
}, },
}], }],
['OS == "ios"', { ['OS == "ios"', {
'dependencies' : [
'<(DEPTH)/testing/iossim/iossim.gyp:iossim',
],
'direct_dependent_settings': { 'direct_dependent_settings': {
'target_conditions': [ 'target_conditions': [
# Turn all tests into bundles on iOS because that's the only # Turn all tests into bundles on iOS because that's the only
......
...@@ -3,47 +3,90 @@ ...@@ -3,47 +3,90 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'variables': {
'iphone_sim_path': '$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
'other_frameworks_path': '$(DEVELOPER_DIR)/../OtherFrameworks'
},
'targets': [ 'targets': [
{ {
'target_name': 'iossim', 'target_name': 'iossim',
'type': 'executable', 'conditions': [
'dependencies': [ ['OS != "ios"', {
'<(DEPTH)/testing/iossim/third_party/class-dump/class-dump.gyp:class-dump', 'type': 'executable',
], 'variables': {
'include_dirs': [ 'developer_dir': '<!(xcode-select -print-path)',
'<(INTERMEDIATE_DIR)/iossim', 'iphone_sim_path': '<(developer_dir)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks',
], 'other_frameworks_path': '<(developer_dir)/../OtherFrameworks'
'sources': [ },
'iossim.mm', 'dependencies': [
'<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', 'third_party/class-dump/class-dump.gyp:class-dump',
],
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
],
'actions': [
{
'action_name': 'generate_iphone_sim_header',
'inputs': [
'<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versions/Current/iPhoneSimulatorRemoteClient',
'$(BUILD_DIR)/$(CONFIGURATION)/class-dump',
], ],
'outputs': [ 'include_dirs': [
'<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h' '<(INTERMEDIATE_DIR)/iossim',
], ],
'action': [ 'sources': [
# Actions don't provide a way to redirect stdout, so a custom 'iossim.mm',
# script is invoked that will execute the first argument and write
# the output to the file specified as the second argument.
'<(DEPTH)/testing/iossim/redirect-stdout.sh',
'$(BUILD_DIR)/$(CONFIGURATION)/class-dump -CiPhoneSimulator <(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework',
'<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h', '<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
], ],
'message': 'Generating header', 'libraries': [
}, '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
],
'actions': [
{
'action_name': 'generate_iphone_sim_header',
'inputs': [
'<(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework/Versions/Current/iPhoneSimulatorRemoteClient',
'<(PRODUCT_DIR)/class-dump',
],
'outputs': [
'<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h'
],
'action': [
# Actions don't provide a way to redirect stdout, so a custom
# script is invoked that will execute the first argument and write
# the output to the file specified as the second argument.
'./redirect-stdout.sh',
'<(PRODUCT_DIR)/class-dump -CiPhoneSimulator <(iphone_sim_path)/iPhoneSimulatorRemoteClient.framework',
'<(INTERMEDIATE_DIR)/iossim/iPhoneSimulatorRemoteClient.h',
],
'message': 'Generating header',
},
],
}, { # else, OS == "ios"
'type': 'none',
'variables': {
'ninja_output_dir': 'ninja-iossim',
# Gyp to rerun
're_run_targets': [
'testing/iossim/iossim.gyp',
],
},
'includes': ['../../build/ios/mac_build.gypi'],
'actions': [
{
'action_name': 'compile iossim',
'inputs': [],
'outputs': [],
'action': [
'<@(ninja_cmd)',
'iossim',
],
'message': 'Generating the iossim executable',
},
{
'action_name': 'copy iossim',
'inputs': [
# TODO(ios): It should be possible to define the input, but
# adding it causes gyp to complain about duplicate id.
# '<(ninja_product_dir)/iossim',
],
'outputs': [
'<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
],
'action': [
'cp',
'<(ninja_product_dir)/iossim',
'<(DEPTH)/xcodebuild/<(CONFIGURATION_NAME)/iossim',
],
},
],
}],
], ],
}, },
], ],
......
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