]> khamidou — GitHub mirrors - electron.git/commitdiff
linux: Make binary search for libraries under current directory.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 14 Feb 2014 15:11:57 +0000 (15:11 +0000)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 14 Feb 2014 15:11:57 +0000 (15:11 +0000)
atom.gyp

index 6a96bd840c3be13ddad5e7a3cc71c0165ccd35cf..191a44cd685c6346a610b3a37ca6ad77b78616e9 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
             'vendor/breakpad/breakpad.gyp:breakpad_handler',
             'vendor/breakpad/breakpad.gyp:breakpad_sender',
           ],
-        }],
+        }],  # OS=="win"
         ['OS=="mac"', {
           'dependencies': [
             'vendor/breakpad/breakpad.gyp:breakpad',
           ],
-        }],
+        }],  # OS=="mac"
+        ['OS=="linux"', {
+          'link_settings': {
+            # Make binary search for libraries under current directory, so we
+            # don't have to manually set $LD_LIBRARY_PATH:
+            # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
+            'ldflags': [
+              '-rpath \$$ORIGIN',
+            ],
+          },
+        }],  # OS=="linux"
       ],
     },  # target <(product_name)_lib
     {