diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-21 01:15:37 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-21 01:15:37 +0000 |
commit | b1841ed9ec49db4835ea9179e5e0426d7a565271 (patch) | |
tree | fabb5b944bc7537b8701838df0c1835eaf600848 /printing | |
parent | bdf5d875799944b467740fd10772e72f442ea265 (diff) | |
download | chromium_src-b1841ed9ec49db4835ea9179e5e0426d7a565271.zip chromium_src-b1841ed9ec49db4835ea9179e5e0426d7a565271.tar.gz chromium_src-b1841ed9ec49db4835ea9179e5e0426d7a565271.tar.bz2 |
Add linux printing module.
Review URL: http://codereview.chromium.org/27008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/SConstruct | 7 | ||||
-rw-r--r-- | printing/printing.scons | 22 | ||||
-rw-r--r-- | printing/printing_lib.scons | 66 | ||||
-rw-r--r-- | printing/printing_unittests.scons | 108 | ||||
-rw-r--r-- | printing/printing_unittests.vcproj | 2 | ||||
-rw-r--r-- | printing/run_all_unittests.cc | 9 | ||||
-rw-r--r-- | printing/using_printing.scons | 15 |
7 files changed, 228 insertions, 1 deletions
diff --git a/printing/SConstruct b/printing/SConstruct new file mode 100644 index 0000000..feee7f2 --- /dev/null +++ b/printing/SConstruct @@ -0,0 +1,7 @@ +# Copyright (c) 2009 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. + +build_component = 'printing' +SConscript('../build/SConscript.main', + exports=['build_component']) diff --git a/printing/printing.scons b/printing/printing.scons new file mode 100644 index 0000000..c86c31a --- /dev/null +++ b/printing/printing.scons @@ -0,0 +1,22 @@ +# Copyright (c) 2009 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. + +__doc__ = """ +Master configuration for building printing components. +""" + +Import('env') + +# Arrange for Hammer to add all programs to the 'printing' Alias. +env.Append( + COMPONENT_PROGRAM_GROUPS = ['printing'], + COMPONENT_TEST_PROGRAM_GROUPS = ['printing'], +) + +sconscript_files = [ + 'printing_lib.scons', + 'printing_unittests.scons', +] + +SConscript(sconscript_files, exports=['env']) diff --git a/printing/printing_lib.scons b/printing/printing_lib.scons new file mode 100644 index 0000000..29986af --- /dev/null +++ b/printing/printing_lib.scons @@ -0,0 +1,66 @@ +# Copyright (c) 2009 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. + +__doc__ = """ +Configuration for building printing.lib / libprinting.a. +""" + +Import('env') + +env = env.Clone() + +env.Prepend( + CPPPATH = [ + '$CHROME_SRC_DIR', + ], +) + +input_files = ChromeFileList([ + # TODO(sgk): violate standard indentation so we don't have to + # reindent too much when we remove the explicit MSVSFilter() calls + # in favor of generating the hierarchy to reflect the file system. + 'units.cc', + 'units.h', +]) + +env.ChromeLibrary('printing', input_files) + +p = env.ChromeMSVSProject('build/printing.vcproj', + dest='$CHROME_SRC_DIR/printing/printing.vcproj', + guid='{9E5416B9-B91B-4029-93F4-102C1AD5CAF4}', + keyword='Win32Proj', + # TODO(sgk): when we can intuit the hierarchy + # from the built targets. + #buildtargets=TODO, + files=input_files, + tools=[ + 'VCPreBuildEventTool', + 'VCCustomBuildTool', + 'VCXMLDataGeneratorTool', + 'VCWebServiceProxyGeneratorTool', + 'VCMIDLTool', + 'VCCLCompilerTool', + 'VCManagedResourceCompilerTool', + 'VCResourceCompilerTool', + 'VCPreLinkEventTool', + 'VCLibrarianTool', + 'VCALinkTool', + 'VCXDCMakeTool', + 'VCBscMakeTool', + 'VCFxCopTool', + 'VCPostBuildEventTool', + ], + ConfigurationType='4') + +p.AddConfig('Debug|Win32', + InheritedPropertySheets=[ + '$(SolutionDir)../build/debug.vsprops', + './printing.vsprops', + ]) + +p.AddConfig('Release|Win32', + InheritedPropertySheets=[ + '$(SolutionDir)../build/release.vsprops', + './printing.vsprops', + ]) diff --git a/printing/printing_unittests.scons b/printing/printing_unittests.scons new file mode 100644 index 0000000..097a38d --- /dev/null +++ b/printing/printing_unittests.scons @@ -0,0 +1,108 @@ +# Copyright (c) 2009 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. + +__doc__ = """ +Configuration for building the printing_unittests{,.exe} executable. +""" + +Import('env') + +env = env.Clone() + +env.SConscript([ + '$BASE_DIR/using_base.scons', + '$GTEST_DIR/../using_gtest.scons', + '$ICU38_DIR/using_icu38.scons', + '$PRINTING_DIR/using_printing.scons', +], {'env':env}) + +env.Prepend( + CPPPATH = [ + '$CHROME_SRC_DIR', + ], +) + +if env.Bit('windows'): + env.Prepend( + CCFLAGS = [ + '/TP', + '/WX', + ], + CPPDEFINES = [ + '_WIN32_WINNT=0x0600', + 'WINVER=0x0600', + '_HAS_EXCEPTIONS=0', + ], + LINKFLAGS = [ + '/DELAYLOAD:"dwmapi.dll"', + '/DELAYLOAD:"uxtheme.dll"', + '/MACHINE:X86', + '/FIXED:No', + '/safeseh', + '/dynamicbase', + '/ignore:4199', + '/nxcompat', + ], + ) + +input_files = ChromeFileList([ + # TODO(sgk): violate standard indentation so we don't have to + # reindent too much when we remove the explicit MSVSFilter() calls + # in favor of generating the hierarchy to reflect the file system. + MSVSFilter('support', [ + 'run_all_unittests.cc', + '../base/test_suite.h', + ]), + MSVSFilter('tests', [ + 'units_unittest.cc', + ]), +]) + +env.ChromeTestProgram('printing_unittests', input_files) + +p = env.ChromeMSVSProject('build/printing_unittests.vcproj', + dest=('$CHROME_SRC_DIR/printing/' + + 'printing_unittests.vcproj'), + guid='{8B2EE5D9-41BC-4AA2-A401-2DC143A05D2E}', + keyword='Win32Proj', + # TODO(sgk): when we can intuit the hierarchy + # from the built targets. + #buildtargets=TODO, + files=input_files, + tools=[ + 'VCPreBuildEventTool', + 'VCCustomBuildTool', + 'VCXMLDataGeneratorTool', + 'VCWebServiceProxyGeneratorTool', + 'VCMIDLTool', + MSVSTool('VCCLCompilerTool', + PreprocessorDefinitions='UNIT_TEST'), + 'VCManagedResourceCompilerTool', + 'VCResourceCompilerTool', + 'VCPreLinkEventTool', + 'VCLinkerTool', + 'VCALinkTool', + 'VCManifestTool', + 'VCXDCMakeTool', + 'VCBscMakeTool', + 'VCFxCopTool', + 'VCAppVerifierTool', + 'VCWebDeploymentTool', + 'VCPostBuildEventTool', + ], + ConfigurationType='1') + +p.AddConfig('Debug|Win32', + InheritedPropertySheets=[ + '$(SolutionDir)../build/debug.vsprops', + '$(SolutionDir)../testing/using_gtest.vsprops', + 'printing.vsprops', + ]) + +p.AddConfig('Release|Win32', + InheritedPropertySheets=[ + '$(SolutionDir)../build/release.vsprops', + '$(SolutionDir)../testing/using_gtest.vsprops', + 'printing.vsprops', + ]) diff --git a/printing/printing_unittests.vcproj b/printing/printing_unittests.vcproj index 1683999..9abeb90 100644 --- a/printing/printing_unittests.vcproj +++ b/printing/printing_unittests.vcproj @@ -143,7 +143,7 @@ Name="support" > <File - RelativePath="..\base\run_all_unittests.cc" + RelativePath=".\run_all_unittests.cc" > </File> <File diff --git a/printing/run_all_unittests.cc b/printing/run_all_unittests.cc new file mode 100644 index 0000000..d9f6b58 --- /dev/null +++ b/printing/run_all_unittests.cc @@ -0,0 +1,9 @@ +// Copyright (c) 2006-2008 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. + +#include "base/test_suite.h" + +int main(int argc, char** argv) { + return TestSuite(argc, argv).Run(); +} diff --git a/printing/using_printing.scons b/printing/using_printing.scons new file mode 100644 index 0000000..f90e5bf --- /dev/null +++ b/printing/using_printing.scons @@ -0,0 +1,15 @@ +# Copyright (c) 2009 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. + +__doc__ = """ +Settings for other components using the printing library. +""" + +Import("env") + +env.Append( + LIBS = [ + 'printing', + ], +) |