diff options
author | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 22:07:34 +0000 |
---|---|---|
committer | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 22:07:34 +0000 |
commit | 9da35d991a087e00a5043b33714b46e97282adaf (patch) | |
tree | 972417cdb6044129cc681d7f45531406b5aea713 /o3d | |
parent | 247d30b530b4294c0f18181d9f5041a768851bb9 (diff) | |
download | chromium_src-9da35d991a087e00a5043b33714b46e97282adaf.zip chromium_src-9da35d991a087e00a5043b33714b46e97282adaf.tar.gz chromium_src-9da35d991a087e00a5043b33714b46e97282adaf.tar.bz2 |
This moves the Cg libs into a library directory under the product dir,
and fixes the locations in the executable so that unit tests run
correctly.
Also, removes explicit references to Cg.framework from plugin and
converter gyp files, since they already rely on cg_libs, and that
should be sufficient.
Review URL: http://codereview.chromium.org/276049
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29199 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/build/libs.gyp | 9 | ||||
-rw-r--r-- | o3d/converter/converter.gyp | 1 | ||||
-rwxr-xr-x | o3d/converter/mac/converter_install_name.sh | 2 | ||||
-rw-r--r-- | o3d/plugin/plugin.gyp | 2 | ||||
-rwxr-xr-x | o3d/tests/mac/unit_tests_install_name.sh | 10 | ||||
-rw-r--r-- | o3d/tests/tests.gyp | 12 |
6 files changed, 30 insertions, 6 deletions
diff --git a/o3d/build/libs.gyp b/o3d/build/libs.gyp index 76d1043..1e8b4f2 100644 --- a/o3d/build/libs.gyp +++ b/o3d/build/libs.gyp @@ -101,8 +101,11 @@ [ 'OS=="mac"', { 'direct_dependent_settings': { + 'mac_framework_dirs': [ + "<(PRODUCT_DIR)/Library/Frameworks", + ], 'libraries': [ - "<(PRODUCT_DIR)/Cg.framework", + "<(PRODUCT_DIR)/Library/Frameworks/Cg.framework", ], }, } @@ -110,10 +113,10 @@ ], 'copies': [ { - 'destination': '<(PRODUCT_DIR)', 'conditions' : [ [ 'OS=="linux"', { + 'destination': '<(PRODUCT_DIR)', 'files': [ "../../<(cgdir)/lib/libCg.so", "../../<(cgdir)/lib/libCgGL.so", @@ -123,6 +126,7 @@ ], [ 'OS=="win"', { + 'destination': '<(PRODUCT_DIR)', 'files': [ "../../<(cgdir)/bin/cg.dll", "../../<(cgdir)/bin/cgD3D9.dll", @@ -134,6 +138,7 @@ ], [ 'OS=="mac"', { + 'destination': '<(PRODUCT_DIR)/Library/Frameworks', 'files': [ "../../<(cgdir)/Cg.framework", ] diff --git a/o3d/converter/converter.gyp b/o3d/converter/converter.gyp index 4c27a65..ffede11f 100644 --- a/o3d/converter/converter.gyp +++ b/o3d/converter/converter.gyp @@ -84,7 +84,6 @@ '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework', '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', - '../../<(cgdir)/Cg.framework', ], }, }, diff --git a/o3d/converter/mac/converter_install_name.sh b/o3d/converter/mac/converter_install_name.sh index b3448c2..d6af0b0 100755 --- a/o3d/converter/mac/converter_install_name.sh +++ b/o3d/converter/mac/converter_install_name.sh @@ -6,5 +6,5 @@ /usr/bin/install_name_tool -change \ @executable_path/../Library/Frameworks/Cg.framework/Cg \ - @executable_path/Cg.framework/Cg \ + @executable_path/Library/Frameworks/Cg.framework/Cg \ "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp index 4c9da18..0341f97 100644 --- a/o3d/plugin/plugin.gyp +++ b/o3d/plugin/plugin.gyp @@ -145,7 +145,6 @@ '$(SDKROOT)/System/Library/Frameworks/QuickTime.framework', 'libbreakpad.a', 'libbreakpad_utilities.a', - '../../third_party/cg/files/mac/Cg.framework', '../../third_party/glew/files/lib/libMacStaticGLEW.a', ], }, @@ -325,7 +324,6 @@ '$(SDKROOT)/System/Library/Frameworks/QuickTime.framework', 'libbreakpad.a', 'libbreakpad_utilities.a', - '../../third_party/cg/files/mac/Cg.framework', '../../third_party/glew/files/lib/libMacStaticGLEW.a', ], }, diff --git a/o3d/tests/mac/unit_tests_install_name.sh b/o3d/tests/mac/unit_tests_install_name.sh new file mode 100755 index 0000000..d6af0b0 --- /dev/null +++ b/o3d/tests/mac/unit_tests_install_name.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# 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. + +/usr/bin/install_name_tool -change \ + @executable_path/../Library/Frameworks/Cg.framework/Cg \ + @executable_path/Library/Frameworks/Cg.framework/Cg \ + "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}" diff --git a/o3d/tests/tests.gyp b/o3d/tests/tests.gyp index b32dc5d..92d4fbf 100644 --- a/o3d/tests/tests.gyp +++ b/o3d/tests/tests.gyp @@ -110,6 +110,18 @@ 'sources': [ 'common/mac/testing_common.mm', ], + 'postbuilds': [ + { + 'variables': { + # Define install_name in a variable ending in _path + # so that gyp understands it's a path and performs proper + # relativization during dict merging. + 'install_name_path': 'mac/unit_tests_install_name.sh', + }, + 'postbuild_name': 'Fix Framework Paths', + 'action': ['<(install_name_path)'], + }, + ], 'copies': [ { 'destination': '<(PRODUCT_DIR)', |