summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
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',
+ ],
+ },
+ ],
+ ],
+ },
+ ],
+}