diff options
author | bungeman <bungeman@chromium.org> | 2015-06-19 07:27:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-19 14:27:41 +0000 |
commit | f5a2156812c318825b6438258d9f882fc63ecd16 (patch) | |
tree | 94cbac4e899d391a05cac0d6950efa7eec2bef92 /cloud_print/service | |
parent | 3c35a60b2cf1a57e13e36e514296887cea10cd33 (diff) | |
download | chromium_src-f5a2156812c318825b6438258d9f882fc63ecd16.zip chromium_src-f5a2156812c318825b6438258d9f882fc63ecd16.tar.gz chromium_src-f5a2156812c318825b6438258d9f882fc63ecd16.tar.bz2 |
Only create cloud_print targets for Windows on Windows.
In cloud_print/service/service.gyp the targets:
cloud_print_service
cloud_print_service_config
cloud_print_service_setup
are only useful on Windows but are defined on all platforms.
Attempting to build any of these targets on other platforms will
result in a build error as the 'win/*' sources are removed by glob
meaning that cloud_print_resources.gyp:cloud_print_version_resources
has no sources, resulting in cloud_print_service_exe_version.rc
not being created, causing this source not to be found.
This also explicitly calls out the dependency of these three targets
on the cloud_print_version_resources target to create the
cloud_print_service_exe_version.rc file.
TBR=dpranke@chromium.org
The gn_migration.gypi change just updates where the targets are.
Review URL: https://codereview.chromium.org/1153263002
Cr-Commit-Position: refs/heads/master@{#335254}
Diffstat (limited to 'cloud_print/service')
-rw-r--r-- | cloud_print/service/service.gyp | 87 | ||||
-rw-r--r-- | cloud_print/service/win/common-controls.manifest (renamed from cloud_print/service/common-controls.manifest) | 0 | ||||
-rw-r--r-- | cloud_print/service/win/service.gyp | 120 |
3 files changed, 120 insertions, 87 deletions
diff --git a/cloud_print/service/service.gyp b/cloud_print/service/service.gyp index fc680a8..1eb2b23 100644 --- a/cloud_print/service/service.gyp +++ b/cloud_print/service/service.gyp @@ -119,92 +119,5 @@ 'win/setup_listener.h', ], }, - { - 'target_name': 'cloud_print_service', - 'type': 'executable', - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_exe_version.rc', - 'win/cloud_print_service.cc', - ], - 'includes': [ - 'win/service_resources.gypi' - ], - 'dependencies': [ - 'cloud_print_service_lib', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'SubSystem': '1', # Set /SUBSYSTEM:CONSOLE - 'UACExecutionLevel': '2', # /level='requireAdministrator' - 'AdditionalDependencies': [ - 'secur32.lib', - ], - }, - }, - }, - { - 'target_name': 'cloud_print_service_config', - 'type': 'executable', - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_config_exe_version.rc', - 'win/cloud_print_service_config.cc', - ], - 'includes': [ - 'win/service_resources.gypi' - ], - 'dependencies': [ - '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib', - 'cloud_print_service_lib', - ], - 'msvs_settings': { - 'VCManifestTool': { - 'AdditionalManifestFiles': [ - 'common-controls.manifest', - ], - }, - 'VCLinkerTool': { - 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS - 'UACExecutionLevel': '2', # /level='requireAdministrator' - 'AdditionalDependencies': [ - 'secur32.lib', - ], - }, - 'conditions': [ - ['clang==1', { - # atlapp.h contains a global "using namespace WTL;". - # TODO: Remove once cloud_print_service_config.cc no longer depends - # on atlapp.h, http://crbug.com/5027 - 'VCCLCompilerTool': { - 'AdditionalOptions': ['-Wno-header-hygiene'], - }, - }], - ], - }, - }, - { - 'target_name': 'cloud_print_service_setup', - 'type': 'executable', - 'sources': [ - '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_setup_exe_version.rc', - 'win/installer.cc', - 'win/installer.h', - ], - 'includes': [ - 'win/service_resources.gypi' - ], - 'dependencies': [ - '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib', - 'cloud_print_service_lib', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS - 'UACExecutionLevel': '2', # /level='requireAdministrator' - 'AdditionalDependencies': [ - 'secur32.lib', - ], - }, - }, - }, ], } diff --git a/cloud_print/service/common-controls.manifest b/cloud_print/service/win/common-controls.manifest index 1710196..1710196 100644 --- a/cloud_print/service/common-controls.manifest +++ b/cloud_print/service/win/common-controls.manifest diff --git a/cloud_print/service/win/service.gyp b/cloud_print/service/win/service.gyp new file mode 100644 index 0000000..1221842 --- /dev/null +++ b/cloud_print/service/win/service.gyp @@ -0,0 +1,120 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'target_defaults': { + 'variables': { + 'chromium_code': 1, + 'enable_wexit_time_destructors': 1, + }, + 'include_dirs': [ + '<(DEPTH)', + # To allow including "version.h" + '<(SHARED_INTERMEDIATE_DIR)', + ], + 'defines' : [ + 'COMPILE_CONTENT_STATICALLY', + 'SECURITY_WIN32', + 'STRICT', + '_ATL_APARTMENT_THREADED', + '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS', + '_ATL_NO_COM_SUPPORT', + '_ATL_NO_AUTOMATIC_NAMESPACE', + '_ATL_NO_EXCEPTIONS', + ], + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + 'msvs_disabled_warnings': [ 4267, ], + }, + 'targets': [ + { + 'target_name': 'cloud_print_service', + 'type': 'executable', + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_exe_version.rc', + 'cloud_print_service.cc', + ], + 'includes': [ + 'service_resources.gypi' + ], + 'dependencies': [ + '<(DEPTH)/cloud_print/cloud_print_resources.gyp:cloud_print_version_resources', + '<(DEPTH)/cloud_print/service/service.gyp:cloud_print_service_lib', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '1', # Set /SUBSYSTEM:CONSOLE + 'UACExecutionLevel': '2', # /level='requireAdministrator' + 'AdditionalDependencies': [ + 'secur32.lib', + ], + }, + }, + }, + { + 'target_name': 'cloud_print_service_config', + 'type': 'executable', + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_config_exe_version.rc', + 'cloud_print_service_config.cc', + ], + 'includes': [ + 'service_resources.gypi' + ], + 'dependencies': [ + '<(DEPTH)/cloud_print/cloud_print_resources.gyp:cloud_print_version_resources', + '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib', + '<(DEPTH)/cloud_print/service/service.gyp:cloud_print_service_lib', + ], + 'msvs_settings': { + 'VCManifestTool': { + 'AdditionalManifestFiles': [ + 'common-controls.manifest', + ], + }, + 'VCLinkerTool': { + 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS + 'UACExecutionLevel': '2', # /level='requireAdministrator' + 'AdditionalDependencies': [ + 'secur32.lib', + ], + }, + 'conditions': [ + ['clang==1', { + # atlapp.h contains a global "using namespace WTL;". + # TODO: Remove once cloud_print_service_config.cc no longer depends + # on atlapp.h, http://crbug.com/5027 + 'VCCLCompilerTool': { + 'AdditionalOptions': ['-Wno-header-hygiene'], + }, + }], + ], + }, + }, + { + 'target_name': 'cloud_print_service_setup', + 'type': 'executable', + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_setup_exe_version.rc', + 'installer.cc', + 'installer.h', + ], + 'includes': [ + 'service_resources.gypi' + ], + 'dependencies': [ + '<(DEPTH)/cloud_print/cloud_print_resources.gyp:cloud_print_version_resources', + '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib', + '<(DEPTH)/cloud_print/service/service.gyp:cloud_print_service_lib', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS + 'UACExecutionLevel': '2', # /level='requireAdministrator' + 'AdditionalDependencies': [ + 'secur32.lib', + ], + }, + }, + }, + ], +} |