From 9da35d991a087e00a5043b33714b46e97282adaf Mon Sep 17 00:00:00 2001 From: "gspencer@google.com" Date: Thu, 15 Oct 2009 22:07:34 +0000 Subject: 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 --- o3d/tests/mac/unit_tests_install_name.sh | 10 ++++++++++ o3d/tests/tests.gyp | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 o3d/tests/mac/unit_tests_install_name.sh (limited to 'o3d/tests') 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)', -- cgit v1.1