summaryrefslogtreecommitdiffstats
path: root/o3d/converter
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/converter')
-rw-r--r--o3d/converter/converter.gyp14
-rwxr-xr-xo3d/converter/mac/converter_install_name.sh7
2 files changed, 20 insertions, 1 deletions
diff --git a/o3d/converter/converter.gyp b/o3d/converter/converter.gyp
index a96372c..0e15f54 100644
--- a/o3d/converter/converter.gyp
+++ b/o3d/converter/converter.gyp
@@ -58,6 +58,18 @@
'conditions' : [
['OS == "mac"',
{
+ '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/converter_install_name.sh',
+ },
+ 'postbuild_name': 'Fix Framework Paths',
+ 'action': ['<(install_name_path)'],
+ },
+ ],
'sources': [
'mac/converter_main.mm',
],
@@ -66,7 +78,7 @@
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
'$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
- '../../../<(cgdir)/Cg.framework',
+ '../../<(cgdir)/Cg.framework',
],
},
},
diff --git a/o3d/converter/mac/converter_install_name.sh b/o3d/converter/mac/converter_install_name.sh
new file mode 100755
index 0000000..f20f43d
--- /dev/null
+++ b/o3d/converter/mac/converter_install_name.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+
+/usr/bin/install_name_tool -change \
+ @executable_path/../Library/Frameworks/Cg.framework/Cg \
+ @executable_path/Cg.framework/Cg \
+ "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"