Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: build/SConscript.main

Issue 14467: Underlying functionality for generating native Visual Studio solution files:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | site_scons/site_tools/MSVSNew.py » ('j') | site_scons/site_tools/_Node_MSVS.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 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 os 5 import os
6 import shutil 6 import shutil
7 import sys 7 import sys
8 8
9 9
10 if sys.platform == 'win32': 10 if sys.platform == 'win32':
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 clvars = Variables('scons.opts', ARGUMENTS) 57 clvars = Variables('scons.opts', ARGUMENTS)
58 clvars.AddVariables( 58 clvars.AddVariables(
59 ('BUILD_TARGET_DIR', '', 'Hammer'), 59 ('BUILD_TARGET_DIR', '', 'Hammer'),
60 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')), 60 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')),
61 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')), 61 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')),
62 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')), 62 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')),
63 ) 63 )
64 64
65 65
66 root_env = Environment( 66 root_env = Environment(
67 # MSVSNew in the base environment? Yes, the point is we can (and
68 # want to) generate Visual Studio project and solution files from
69 # any platform.
67 tools = ['component_setup', 70 tools = ['component_setup',
68 'chromium_builders', 71 'chromium_builders',
69 'chromium_load_component'], 72 'chromium_load_component',
73 'MSVSNew'],
70 variables = clvars, 74 variables = clvars,
71 75
72 # Requested list of system (shared) libraries, from the comma separated 76 # Requested list of system (shared) libraries, from the comma separated
73 # SYSTEM_LIBS command-line argument 77 # SYSTEM_LIBS command-line argument
74 req_system_libs = [], 78 req_system_libs = [],
75 # All supported system libraries, for the help message 79 # All supported system libraries, for the help message
76 all_system_libs = [], 80 all_system_libs = [],
77 81
78 CHROME_SRC_DIR = '$MAIN_DIR/..', 82 CHROME_SRC_DIR = '$MAIN_DIR/..',
79 DESTINATION_ROOT = '$MAIN_DIR/$BUILD_TARGET_DIR', 83 DESTINATION_ROOT = '$MAIN_DIR/$BUILD_TARGET_DIR',
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 BZIP2_DIR = '$THIRD_PARTY_DIR/bzip2', 123 BZIP2_DIR = '$THIRD_PARTY_DIR/bzip2',
120 ICU38_DIR = '$THIRD_PARTY_DIR/icu38', 124 ICU38_DIR = '$THIRD_PARTY_DIR/icu38',
121 LIBEVENT_DIR = '$THIRD_PARTY_DIR/libevent', 125 LIBEVENT_DIR = '$THIRD_PARTY_DIR/libevent',
122 LIBJPEG_DIR = '$THIRD_PARTY_DIR/libjpeg', 126 LIBJPEG_DIR = '$THIRD_PARTY_DIR/libjpeg',
123 LIBPNG_DIR = '$THIRD_PARTY_DIR/libpng', 127 LIBPNG_DIR = '$THIRD_PARTY_DIR/libpng',
124 LIBXML_DIR = '$THIRD_PARTY_DIR/libxml', 128 LIBXML_DIR = '$THIRD_PARTY_DIR/libxml',
125 LIBXSLT_DIR = '$THIRD_PARTY_DIR/libxslt', 129 LIBXSLT_DIR = '$THIRD_PARTY_DIR/libxslt',
126 LZMA_SDK_DIR = '$THIRD_PARTY_DIR/lzma_sdk', 130 LZMA_SDK_DIR = '$THIRD_PARTY_DIR/lzma_sdk',
127 MODP_B64_DIR = '$THIRD_PARTY_DIR/modp_b64', 131 MODP_B64_DIR = '$THIRD_PARTY_DIR/modp_b64',
128 NPAPI_DIR = '$THIRD_PARTY_DIR/npapi', 132 NPAPI_DIR = '$THIRD_PARTY_DIR/npapi',
133 SQLITE_DIR = '$THIRD_PARTY_DIR/sqlite',
129 ZLIB_DIR = '$THIRD_PARTY_DIR/zlib', 134 ZLIB_DIR = '$THIRD_PARTY_DIR/zlib',
130 135
131 THIRD_PARTY_WEBKIT_DIR = '$THIRD_PARTY_DIR/WebKit', 136 THIRD_PARTY_WEBKIT_DIR = '$THIRD_PARTY_DIR/WebKit',
132 137
133 PYTHON=sys.executable, 138 PYTHON=sys.executable,
134 139
135 PERL = 'perl', 140 PERL = 'perl',
136 PERL_INCLUDE_FLAG = '-I ', 141 PERL_INCLUDE_FLAG = '-I ',
137 PERL_INCLUDE_SUFFIX = '', 142 PERL_INCLUDE_SUFFIX = '',
138 _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, ' 143 _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, '
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 219
215 # Add the final list into the root environment to be build in BuildComponents. 220 # Add the final list into the root environment to be build in BuildComponents.
216 root_env.Append(BUILD_SCONSCRIPTS = sconscripts) 221 root_env.Append(BUILD_SCONSCRIPTS = sconscripts)
217 222
218 223
219 224
220 # -------------------------------------------------------------------------- 225 # --------------------------------------------------------------------------
221 # Windows specific 226 # Windows specific
222 227
223 windows_env = root_env.Clone() 228 windows_env = root_env.Clone()
229
224 windows_env.Tool('target_platform_windows') 230 windows_env.Tool('target_platform_windows')
225 windows_env.Tool('component_targets_msvs') # Per target project support. 231 windows_env.Tool('component_targets_msvs') # Per target project support.
232
233 # Hammer's target_platform_windows module added the stock SCons
234 # MSVSProject() and MSVSSolution() Builders, which we're going to
235 # replace with our newer, more flexible implementation. Wipe out the
236 # older ones so they don't interfere with our initialization and so
237 # SCons doesn't propagate them to cloned construction environments.
238 del windows_env['BUILDERS']['MSVSProject']
239 del windows_env['BUILDERS']['MSVSSolution']
240 windows_env.Tool('MSVSNew')
241
226 windows_env.Tool('midl') 242 windows_env.Tool('midl')
227 243
228 # TODO(bradnelson): target_platform_windows defines a whole bunch of 244 # TODO(bradnelson): target_platform_windows defines a whole bunch of
229 # flags that we don't care about, including defining OS_WINDOWS in a 245 # flags that we don't care about, including defining OS_WINDOWS in a
230 # way that we don't want, and (most especially) adding *_DEBUG and 246 # way that we don't want, and (most especially) adding *_DEBUG and
231 # *_OPTIMIZED constructionv variables that add magic values to 247 # *_OPTIMIZED constructionv variables that add magic values to
232 # CCFLAGS. We override the normal variables (CPPDEFINES, CCFLAGS, 248 # CCFLAGS. We override the normal variables (CPPDEFINES, CCFLAGS,
233 # LINKFLAGS, ARFLAGS) below, but get rid of the special Hammer ones 249 # LINKFLAGS, ARFLAGS) below, but get rid of the special Hammer ones
234 # here, until Hammer can be made a little nicer about htis. 250 # here, until Hammer can be made a little nicer about htis.
235 251
236 del windows_env['CCFLAGS_DEBUG'] 252 del windows_env['CCFLAGS_DEBUG']
237 del windows_env['LINKFLAGS_DEBUG'] 253 del windows_env['LINKFLAGS_DEBUG']
238 del windows_env['CCFLAGS_OPTIMIZED'] 254 del windows_env['CCFLAGS_OPTIMIZED']
239 255
240 windows_env['PDB'] = '${TARGET.base}.pdb' 256 windows_env['PDB'] = '${TARGET.base}.pdb'
241 windows_env['MSVC_BATCH'] = True 257 windows_env['MSVC_BATCH'] = True
242 258
243 # TODO(bradnelson): this should not need to be gated on host platform. 259 # TODO(bradnelson): this should not need to be gated on host platform.
244 if root_env['PLATFORM'] in ['win32', 'cygwin']: 260 if root_env['PLATFORM'] in ['win32', 'cygwin']:
245 msvs_env = Environment(tools=['msvc', 'mslink', 'msvs'])['ENV'] 261 msvs_env = Environment(tools=['msvc', 'mslink'])['ENV']
246 msvs_drive = msvs_env['PATH'][0] 262 msvs_drive = msvs_env['PATH'][0]
247 else: 263 else:
248 msvs_env = {'PATH': '', 'INCLUDE': '', 'LIB': ''} 264 msvs_env = {'PATH': '', 'INCLUDE': '', 'LIB': ''}
249 msvs_drive = 'C' 265 msvs_drive = 'C'
250 266
251 # Use the absolute path for MSVC because it might not be on the same drive 267 # Use the absolute path for MSVC because it might not be on the same drive
252 # as our source checkout. 268 # as our source checkout.
253 visual_studio_path = msvs_drive + ':/Program Files/Microsoft Visual Studio 8' 269 visual_studio_path = msvs_drive + ':/Program Files/Microsoft Visual Studio 8'
254 270
255 # If side-by-side platform sdk is not available try local copy. 271 # If side-by-side platform sdk is not available try local copy.
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 'all_libraries', 734 'all_libraries',
719 'all_languages', 735 'all_languages',
720 'all_programs', 736 'all_programs',
721 'all_test_programs', 737 'all_test_programs',
722 ], projects = [p], 738 ], projects = [p],
723 COMPONENT_VS_PROJECT_SCRIPT_PATH=( 739 COMPONENT_VS_PROJECT_SCRIPT_PATH=(
724 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), 740 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'),
725 ) 741 )
726 742
727 # ------------------------------------------------------------------------- 743 # -------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « no previous file | site_scons/site_tools/MSVSNew.py » ('j') | site_scons/site_tools/_Node_MSVS.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698