summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 19:15:10 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 19:15:10 +0000
commit83f7b12249d4800cdbc9c4f2bbbccb4299b750d4 (patch)
treefa7b09b8009f6bbe2b0816e03d257fe8d05f265f /o3d
parenta4b9c3f468bb51a71737d88705cbbcccc1fdde97 (diff)
downloadchromium_src-83f7b12249d4800cdbc9c4f2bbbccb4299b750d4.zip
chromium_src-83f7b12249d4800cdbc9c4f2bbbccb4299b750d4.tar.gz
chromium_src-83f7b12249d4800cdbc9c4f2bbbccb4299b750d4.tar.bz2
This splits the import.gyp file into two parts (one for building archive lib,
and one for building import lib), so that the chrome build can depend only on the archive.gyp file to reduce its dependencies. It also adds a missing gyp file for the tests. Review URL: http://codereview.chromium.org/149623 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/converter/converter.gyp2
-rw-r--r--o3d/import/archive.gyp68
-rw-r--r--o3d/import/cross/archive_processor.cc3
-rw-r--r--o3d/import/cross/archive_request.cc2
-rw-r--r--o3d/import/import.gyp67
-rw-r--r--o3d/plugin/plugin.gyp5
-rw-r--r--o3d/tests/tests.gyp115
7 files changed, 186 insertions, 76 deletions
diff --git a/o3d/converter/converter.gyp b/o3d/converter/converter.gyp
index 3b14115..54fd5a1 100644
--- a/o3d/converter/converter.gyp
+++ b/o3d/converter/converter.gyp
@@ -31,7 +31,7 @@
'../compiler/technique/technique.gyp:technique',
'../core/core.gyp:o3dCore',
'../core/core.gyp:o3dCorePlatform',
- '../import/import.gyp:o3dArchive',
+ '../import/archive.gyp:o3dArchive',
'../import/import.gyp:o3dImport',
'../serializer/serializer.gyp:o3dSerializer',
'../utils/utils.gyp:o3dUtils',
diff --git a/o3d/import/archive.gyp b/o3d/import/archive.gyp
new file mode 100644
index 0000000..8214cfc
--- /dev/null
+++ b/o3d/import/archive.gyp
@@ -0,0 +1,68 @@
+# 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.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '..',
+ '../..',
+ '../../<(cgdir)/include',
+ '../../<(gtestdir)',
+ ],
+ },
+ 'targets': [
+ {
+ 'target_name': 'o3dArchive',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../<(zlibdir)/zlib.gyp:zlib',
+ ],
+ 'sources': [
+ 'cross/archive_processor.cc',
+ 'cross/archive_processor.h',
+ 'cross/archive_request.cc',
+ 'cross/archive_request.h',
+ 'cross/gz_compressor.cc',
+ 'cross/gz_compressor.h',
+ 'cross/gz_decompressor.cc',
+ 'cross/gz_decompressor.h',
+ 'cross/iarchive_generator.h',
+ 'cross/memory_buffer.h',
+ 'cross/memory_stream.cc',
+ 'cross/memory_stream.h',
+ 'cross/raw_data.cc',
+ 'cross/raw_data.h',
+ 'cross/tar_processor.cc',
+ 'cross/tar_processor.h',
+ 'cross/targz_generator.h',
+ 'cross/targz_processor.cc',
+ 'cross/targz_processor.h',
+ ],
+ },
+ {
+ 'target_name': 'o3dArchiveTest',
+ 'type': 'none',
+ 'dependencies': [
+ 'o3dArchive',
+ ],
+ 'direct_dependent_settings': {
+ 'sources': [
+ 'cross/gz_compressor_test.cc',
+ 'cross/gz_decompressor_test.cc',
+ 'cross/memory_buffer_test.cc',
+ 'cross/memory_stream_test.cc',
+ 'cross/raw_data_test.cc',
+ 'cross/tar_processor_test.cc',
+ 'cross/targz_processor_test.cc',
+ ],
+ },
+ },
+ ],
+}
diff --git a/o3d/import/cross/archive_processor.cc b/o3d/import/cross/archive_processor.cc
index b3abd87..8601695 100644
--- a/o3d/import/cross/archive_processor.cc
+++ b/o3d/import/cross/archive_processor.cc
@@ -29,9 +29,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-#include "import/cross/precompile.h"
-
#include <sys/stat.h>
#include "import/cross/archive_processor.h"
diff --git a/o3d/import/cross/archive_request.cc b/o3d/import/cross/archive_request.cc
index fd75413..84448e4 100644
--- a/o3d/import/cross/archive_request.cc
+++ b/o3d/import/cross/archive_request.cc
@@ -31,8 +31,6 @@
// This file contains the definition of the ArchiveRequest class.
-#include "import/cross/precompile.h"
-
#include "import/cross/archive_request.h"
#include "import/cross/targz_processor.h"
diff --git a/o3d/import/import.gyp b/o3d/import/import.gyp
index bdbe989..81f75e5 100644
--- a/o3d/import/import.gyp
+++ b/o3d/import/import.gyp
@@ -22,6 +22,7 @@
'target_name': 'o3dImport',
'type': 'static_library',
'dependencies': [
+ 'archive.gyp:o3dArchive',
'../../<(antlrdir)/antlr.gyp:antlr3c',
'../../<(fcolladadir)/fcollada.gyp:fcollada',
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
@@ -40,15 +41,11 @@
'cross/destination_buffer.h',
'cross/file_output_stream_processor.cc',
'cross/file_output_stream_processor.h',
- 'cross/gz_compressor.cc',
- 'cross/gz_compressor.h',
'cross/precompile.h',
'cross/tar_generator.cc',
'cross/tar_generator.h',
- 'cross/tar_processor.h',
'cross/targz_generator.cc',
'cross/targz_generator.h',
- 'cross/targz_processor.h',
'cross/zip_archive.cc',
'cross/zip_archive.h',
],
@@ -89,77 +86,15 @@
],
},
{
- 'target_name': 'o3dArchive',
- 'type': 'static_library',
- 'dependencies': [
- '../../<(antlrdir)/antlr.gyp:antlr3c',
- '../../<(fcolladadir)/fcollada.gyp:fcollada',
- '../../<(jpegdir)/libjpeg.gyp:libjpeg',
- '../../<(pngdir)/libpng.gyp:libpng',
- '../../<(zlibdir)/zlib.gyp:zlib',
- ],
- 'sources': [
- 'cross/archive_processor.cc',
- 'cross/archive_processor.h',
- 'cross/archive_request.cc',
- 'cross/archive_request.h',
- 'cross/gz_decompressor.cc',
- 'cross/gz_decompressor.h',
- 'cross/iarchive_generator.h',
- 'cross/memory_buffer.h',
- 'cross/memory_stream.cc',
- 'cross/memory_stream.h',
- 'cross/raw_data.cc',
- 'cross/raw_data.h',
- 'cross/tar_generator.h',
- 'cross/tar_processor.cc',
- 'cross/tar_processor.h',
- 'cross/targz_generator.h',
- 'cross/targz_processor.cc',
- 'cross/targz_processor.h',
- ],
- 'conditions' : [
- ['renderer == "d3d9" and OS == "win"',
- {
- 'include_dirs': [
- '$(DXSDK_DIR)/Include',
- ],
- }
- ],
- ],
- },
- {
'target_name': 'o3dImportTest',
'type': 'none',
'dependencies': [
- 'o3dArchive',
'o3dImport',
- '../../<(antlrdir)/antlr.gyp:antlr3c',
- '../../<(fcolladadir)/fcollada.gyp:fcollada',
- '../../<(jpegdir)/libjpeg.gyp:libjpeg',
- '../../<(pngdir)/libpng.gyp:libpng',
- '../../<(zlibdir)/zlib.gyp:zlib',
],
'direct_dependent_settings': {
'sources': [
- 'cross/gz_compressor_test.cc',
- 'cross/gz_decompressor_test.cc',
- 'cross/memory_buffer_test.cc',
- 'cross/memory_stream_test.cc',
- 'cross/raw_data_test.cc',
'cross/tar_generator_test.cc',
- 'cross/tar_processor_test.cc',
'cross/targz_generator_test.cc',
- 'cross/targz_processor_test.cc',
- ],
- 'conditions' : [
- ['renderer == "d3d9" and OS == "win"',
- {
- 'include_dirs': [
- '$(DXSDK_DIR)/Include',
- ],
- }
- ],
],
},
},
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index 3966d40..bf4fcc4 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -27,18 +27,15 @@
'target_name': 'npo3dautoplugin',
'type': 'shared_library',
'dependencies': [
- '../../<(antlrdir)/antlr.gyp:antlr3c',
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
'../../<(pngdir)/libpng.gyp:libpng',
'../../<(zlibdir)/zlib.gyp:zlib',
'../../base/base.gyp:base',
'../../skia/skia.gyp:skia',
'../../v8/tools/gyp/v8.gyp:v8',
- '../compiler/technique/technique.gyp:technique',
'../core/core.gyp:o3dCore',
'../core/core.gyp:o3dCorePlatform',
- '../import/import.gyp:o3dArchive',
- '../import/import.gyp:o3dImport',
+ '../import/archive.gyp:o3dArchive',
'../serializer/serializer.gyp:o3dSerializer',
'../utils/utils.gyp:o3dUtils',
'../build/nacl.gyp:build_nacl',
diff --git a/o3d/tests/tests.gyp b/o3d/tests/tests.gyp
new file mode 100644
index 0000000..895f2e5
--- /dev/null
+++ b/o3d/tests/tests.gyp
@@ -0,0 +1,115 @@
+# 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.
+
+{
+ 'variables': {
+ 'chromium_code': 1,
+ },
+ 'includes': [
+ '../build/common.gypi',
+ ],
+ 'target_defaults': {
+ 'include_dirs': [
+ '..',
+ '../..',
+ ],
+ },
+ 'targets': [
+ {
+ 'target_name': 'unit_tests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../<(antlrdir)/antlr.gyp:antlr3c',
+ '../../<(fcolladadir)/fcollada.gyp:fcollada',
+ '../../<(jpegdir)/libjpeg.gyp:libjpeg',
+ '../../<(pngdir)/libpng.gyp:libpng',
+ '../../<(zlibdir)/zlib.gyp:zlib',
+ '../../base/base.gyp:base',
+ '../../skia/skia.gyp:skia',
+ '../../testing/gtest.gyp:gtest',
+ '../compiler/technique/technique.gyp:technique',
+ '../core/core.gyp:o3dCoreTest',
+ '../import/import.gyp:o3dImportTest',
+ '../import/archive.gyp:o3dArchiveTest',
+ '../serializer/serializer.gyp:o3dSerializerTest',
+ '../statsreport/statsreport.gyp:o3dStatsReportTest',
+ '../utils/utils.gyp:o3dUtils',
+ '../utils/utils.gyp:o3dUtilsTest',
+ ],
+ 'sources': [
+ 'common/cross/test_utils.cc',
+ 'common/cross/main.cc',
+ ],
+ 'conditions' : [
+ ['OS == "mac"',
+ {
+ 'sources': [
+ 'common/mac/testing_common.cc',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
+ ],
+ },
+ },
+ ],
+ ['OS == "win"',
+ {
+ 'sources': [
+ 'common/win/testing_common.cc',
+ 'common/win/testing_common.h',
+ ],
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'rpcrt4.lib',
+ '../../<(cgdir)/lib/cg.lib',
+ '../../<(cgdir)/lib/cgGL.lib',
+ ],
+ # Set /SUBSYSTEM:WINDOWS for unit_tests.exe, since
+ # it is a windows app.
+ 'SubSystem': '2',
+ # Don't optimize away unreferenced symbols when
+ # linking. If we didn't do this, then none of the
+ # tests would auto-register.
+ 'OptimizeReferences': '1',
+ },
+ },
+ # We switch it to console post-build so that we have a
+ # windows app that can output to the console and still
+ # open windows.
+ 'msvs_postbuild':
+ 'editbin /SUBSYSTEM:CONSOLE $(OutDir)/$(TargetFileName)',
+ },
+ ],
+ ['OS == "win" and renderer == "d3d9"',
+ {
+ 'sources': [
+ 'common/win/dxcapture.cc',
+ ],
+ 'include_dirs': [
+ '$(DXSDK_DIR)/Include',
+ ],
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ '"$(DXSDK_DIR)/Lib/x86/DxErr9.lib"',
+ '"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
+ 'd3d9.lib',
+ ],
+ },
+ },
+ },
+ ],
+ ['OS == "linux"',
+ {
+ 'sources': [
+ 'common/linux/testing_common.cc',
+ ],
+ },
+ ],
+ ],
+ },
+ ],
+}