Added rpath location to C++ SDK sample applications build.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Wed, 22 Apr 2015 18:33:36 +0000 (14:33 -0400)
committerErich Keane <erich.keane@intel.com>
Wed, 22 Apr 2015 20:02:16 +0000 (20:02 +0000)
By adding the "run-time search path" to the build flags, this tells the
application where to search for the needed libraries at run time. This
removes the need to export the output directory for the libraries into
LD_LIBRARY_PATH when executing the sample applications.

Change-Id: Ic0c35cd0f79d35e7e89113735e9f9a23c6466943
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/809
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/examples/SConscript

index b72435a..1be8651 100644 (file)
@@ -49,6 +49,7 @@ if target_os not in ['windows', 'winrt']:
                examples_env.AppendUnique(LIBS = ['-lpthread'])
 
 examples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+examples_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
 examples_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap'])
 if env.get('SECURED') == '1':
     examples_env.AppendUnique(LIBS = ['tinydtls'])