summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--o3d/plugin/plugin.gyp26
1 files changed, 20 insertions, 6 deletions
diff --git a/o3d/plugin/plugin.gyp b/o3d/plugin/plugin.gyp
index efe1495..fcb27b9 100644
--- a/o3d/plugin/plugin.gyp
+++ b/o3d/plugin/plugin.gyp
@@ -232,6 +232,26 @@
'ldflags': [
'-Wl,-znodelete',
'-Wl,--gc-sections',
+ '<!@(pkg-config --libs-only-L xt)',
+ # The Cg libs use three other libraries without linking to them,
+ # which breaks --as-needed, so we have to specify them here before
+ # the --as-needed flag.
+ '-lGL', # Used by libCgGL
+ '-lpthread', # Used by libCg
+ '-lm', # Used by libCg
+ # GYP dumps all static and shared libraries into one archive group
+ # on the command line in arbitrary order, which breaks
+ # --as-needed, so we have to specify the out-of-order ones before
+ # the --as-needed flag.
+ '-lCgGL',
+ '-lGLEW',
+ '-lrt',
+ # Directs the linker to only generate dependencies on libraries
+ # that we actually use. Must come last.
+ '-Wl,--as-needed',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l xt)',
],
'conditions' : [
['plugin_rpath != ""',
@@ -251,12 +271,6 @@
],
},
],
- ['OS == "linux"',
- {
- 'sources': [
- ],
- },
- ],
['OS == "win"',
{
'dependencies': [