summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 00:00:09 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-15 00:00:09 +0000
commit9650ee1b6091dda7e120cb9331cf850341dd1b21 (patch)
treefb9ab4e770cf11dad26eca530f8179401c6db6ab /o3d/plugin
parent7bc2207dbb33378f092a6d8d10968fb59330005d (diff)
downloadchromium_src-9650ee1b6091dda7e120cb9331cf850341dd1b21.zip
chromium_src-9650ee1b6091dda7e120cb9331cf850341dd1b21.tar.gz
chromium_src-9650ee1b6091dda7e120cb9331cf850341dd1b21.tar.bz2
This adds some infrastructure for building O3D as part of the Chrome build,
and fixes some of the "AdditionalDependencies" tags to be just generic 'libraries' tags to be more general. TEST=none BUG=none Review URL: http://codereview.chromium.org/149650 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20688 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/plugin.gyp44
-rw-r--r--o3d/plugin/win/main_win.cc2
2 files changed, 30 insertions, 16 deletions
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index bf4fcc4..688509a 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -21,11 +21,10 @@
'O3D_PLUGIN_MIME_TYPE="<!(python version_info.py --mimetype)"',
],
},
-
'targets': [
{
'target_name': 'npo3dautoplugin',
- 'type': 'shared_library',
+ 'type': '<(o3d_main_lib_type)',
'dependencies': [
'../../<(jpegdir)/libjpeg.gyp:libjpeg',
'../../<(pngdir)/libpng.gyp:libpng',
@@ -103,25 +102,21 @@
'win/update_lock.cc',
'win/update_lock.h',
],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'AdditionalDependencies': [
- 'rpcrt4.lib',
- ],
- },
+ 'link_settings': {
+ 'libraries': [
+ '-lrpcrt4.lib',
+ ],
},
},
],
['OS == "win" and renderer == "d3d9"',
{
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'AdditionalDependencies': [
- '"$(DXSDK_DIR)/Lib/x86/DxErr9.lib"',
- '"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
- 'd3d9.lib',
- ],
- },
+ 'link_settings': {
+ 'libraries': [
+ '-l"$(DXSDK_DIR)/Lib/x86/DxErr9.lib"',
+ '-l"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"',
+ '-ld3d9.lib',
+ ],
},
},
],
@@ -129,6 +124,23 @@
},
],
'conditions': [
+ ['o3d_in_chrome != 0',
+ {
+ 'variables': {
+ 'o3d_main_lib_type': 'static_library',
+ },
+ 'target_defaults': {
+ 'defines': [
+ 'O3D_INTERNAL_PLUGIN=1',
+ ],
+ },
+ },
+ {
+ 'variables': {
+ 'o3d_main_lib_type': 'shared_library',
+ },
+ },
+ ],
['OS != "linux"',
{
'targets': [
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index d2727d7..84347a02 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -553,9 +553,11 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
break; // Ignore this message; we're reentrant.
}
+#if !defined(O3D_INTERNAL_PLUGIN)
// TODO: Only logging for windows until we figure out the proper
// mac way
if (g_logger) g_logger->UpdateLogging();
+#endif
// If rendering continuously, invalidate the window and force a paint if
// it is visible. The paint invalidates the renderer and Tick will later